Fix the %P logfile escape inside a chroot.
[rsync/rsync.git] / log.c
diff --git a/log.c b/log.c
index 991b7cc..333e55d 100644 (file)
--- a/log.c
+++ b/log.c
@@ -57,7 +57,6 @@ extern iconv_t ic_chck;
 extern iconv_t ic_recv;
 #endif
 extern char curr_dir[MAXPATHLEN];
-extern char *module_dir;
 extern unsigned int module_dirlen;
 extern char sender_file_sum[MAX_DIGEST_LEN];
 
@@ -618,7 +617,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        n = timestring(time(NULL));
                        break;
                case 'P':
-                       n = module_dir;
+                       n = lp_path(module_id);
                        break;
                case 'u':
                        n = auth_user;