mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 09:56:29 -05:00
Adds support for filename containing newlines.
This commit is contained in:
parent
0e2a2b3f10
commit
3167ec4048
2 changed files with 3 additions and 2 deletions
4
scan.c
4
scan.c
|
|
@ -695,8 +695,8 @@ static int scan_dir(struct snapraid_scan* scan, struct snapraid_state* state, in
|
|||
pathprint(path_next, sizeof(path_next), "%s%s", dir, name);
|
||||
pathprint(sub_next, sizeof(sub_next), "%s%s", sub, name);
|
||||
|
||||
/* check for not supported file names, limitation derived from the content file format */
|
||||
if (name[0] == 0 || strchr(name, '\n') != 0 || name[strlen(name)-1] == '\r') {
|
||||
/* check for not supported file names */
|
||||
if (name[0] == 0) {
|
||||
fprintf(stderr, "Unsupported name '%s' in file '%s'.\n", name, path_next);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue