mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 03:47:05 -05:00
Fixes support of file names starting or ending with a space.
This commit is contained in:
parent
58f191ef1f
commit
35f3c092ed
8 changed files with 65 additions and 23 deletions
2
scan.c
2
scan.c
|
|
@ -225,7 +225,7 @@ static void scan_dir(struct snapraid_scan* scan, struct snapraid_state* state, s
|
|||
continue;
|
||||
|
||||
/* check for not supported file names, limitation derived from the content file format */
|
||||
if (name[0] == 0 || isspace(name[0]) || isspace(name[strlen(name)-1])) {
|
||||
if (name[0] == 0 || strchr(name, '\n') != 0 || name[strlen(name)-1] == '\r') {
|
||||
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