Support the case of an empty symlink

There is the report of a such condition in Windows.
This commit is contained in:
Andrea Mazzoleni 2015-12-18 19:41:49 +01:00
parent db679dc276
commit d5c0a8c2f3
3 changed files with 19 additions and 4 deletions

View file

@ -1325,6 +1325,8 @@ static int scan_dir(struct snapraid_scan* scan, int level, int is_diff, const ch
exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */
}
if (ret == 0)
log_fatal("WARNING! Empty symbolic link '%s'.\n", path_next);
/* readlink doesn't put the final 0 */
subnew[ret] = 0;