X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4337c8f856340f398695811ddaa5c6f8d005379f..22d49dc429f18b5cccf0f237dfd95cceb0b48367:/options.c diff --git a/options.c b/options.c index 082d4f7d..d01aea94 100644 --- a/options.c +++ b/options.c @@ -686,8 +686,10 @@ int parse_arguments(int *argc, const char ***argv, int frommain) } } else { extern int sanitize_paths; - if (sanitize_paths) - sanitize_path(strdup(files_from), NULL); + if (sanitize_paths) { + files_from = strdup(files_from); + sanitize_path(files_from, NULL); + } filesfrom_fd = open(files_from, O_RDONLY|O_BINARY); if (filesfrom_fd < 0) { rsyserr(FERROR, errno,