Escape path in the log file

This commit is contained in:
Andrea Mazzoleni 2015-02-12 22:55:05 +01:00
parent 8f2b148ff1
commit ea07a7025e
13 changed files with 165 additions and 92 deletions

View file

@ -59,7 +59,7 @@ void state_list(struct snapraid_state* state)
++file_count;
file_size += file->size;
ftag("file:%s:%s:%" PRIu64 ":%" PRIi64 ":%u:%" PRIi64 "\n", disk->name, file->sub, file->size, file->mtime_sec, file->mtime_nsec, file->inode);
ftag("file:%s:%s:%" PRIu64 ":%" PRIi64 ":%u:%" PRIi64 "\n", disk->name, esc(file->sub), file->size, file->mtime_sec, file->mtime_nsec, file->inode);
t = file->mtime_sec;
#if HAVE_LOCALTIME_R
@ -99,7 +99,7 @@ void state_list(struct snapraid_state* state)
++link_count;
ftag("link_%s:%s:%s:%s\n", type, disk->name, link->sub, link->linkto);
ftag("link_%s:%s:%s:%s\n", type, disk->name, esc(link->sub), esc(link->linkto));
printf("%12s ", type);
printf(" ");