Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed _ABS to be defined as MY_ABS.
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
20132c3
..
9824de7
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-49,6
+49,8
@@
extern char *logfile_name;
#if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
extern iconv_t ic_chck;
#endif
#if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
extern iconv_t ic_chck;
#endif
+extern char curr_dir[];
+extern unsigned int module_dirlen;
static int log_initialised;
static int logfile_was_closed;
static int log_initialised;
static int logfile_was_closed;
@@
-88,7
+90,6
@@
struct {
{ 0, NULL }
};
{ 0, NULL }
};
-
/*
* Map from rsync error code to name, or return NULL.
*/
/*
* Map from rsync error code to name, or return NULL.
*/
@@
-384,7
+385,7
@@
void rsyserr(enum logcode code, int errcode, const char *format, ...)
char buf[BIGPATHBUFLEN];
size_t len;
char buf[BIGPATHBUFLEN];
size_t len;
- str
cpy(buf, RSYNC_NAME ": "
);
+ str
lcpy(buf, RSYNC_NAME ": ", sizeof buf
);
len = (sizeof RSYNC_NAME ": ") - 1;
va_start(ap, format);
len = (sizeof RSYNC_NAME ": ") - 1;
va_start(ap, format);
@@
-513,6
+514,14
@@
static void log_formatted(enum logcode code, char *format, char *op,
strlcpy(n, buf2, MAXPATHLEN);
else
n = buf2;
strlcpy(n, buf2, MAXPATHLEN);
else
n = buf2;
+ } else if (*n != '/') {
+ pathjoin(buf2, sizeof buf2,
+ curr_dir + module_dirlen, n);
+ clean_fname(buf2, 0);
+ if (fmt[1])
+ strlcpy(n, buf2, MAXPATHLEN);
+ else
+ n = buf2;
} else
clean_fname(n, 0);
if (*n == '/')
} else
clean_fname(n, 0);
if (*n == '/')
@@
-526,15
+535,15
@@
static void log_formatted(enum logcode code, char *format, char *op,
case 'L':
if (hlink && *hlink) {
n = hlink;
case 'L':
if (hlink && *hlink) {
n = hlink;
- str
cpy(buf2, " => "
);
+ str
lcpy(buf2, " => ", sizeof buf2
);
} else if (S_ISLNK(file->mode) && file->u.link) {
n = file->u.link;
} else if (S_ISLNK(file->mode) && file->u.link) {
n = file->u.link;
- str
cpy(buf2, " -> "
);
+ str
lcpy(buf2, " -> ", sizeof buf2
);
} else {
n = "";
if (!fmt[1])
break;
} else {
n = "";
if (!fmt[1])
break;
- str
cpy(buf2, " "
);
+ str
lcpy(buf2, " ", sizeof buf2
);
}
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2 + 4, sizeof buf2 - 4, fmt, n);
}
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2 + 4, sizeof buf2 - 4, fmt, n);