X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b4bf2b5a7e4c7a76b02efd7d73a7e34b2c78a664..dcbae65444a82532d9a0e5caf5b3861ed1e6f95f:/log.c diff --git a/log.c b/log.c index f91f7a55..c6d2fc81 100644 --- a/log.c +++ b/log.c @@ -397,7 +397,10 @@ static void log_formatted(enum logcode code, char *format, char *op, file->dir.root, n); /* The buffer from safe_fname() has more * room than MAXPATHLEN, so this is safe. */ - strcpy(n, buf2); + if (fmt[1]) + strcpy(n, buf2); + else + n = buf2; } clean_fname(n, 0); if (*n == '/')