mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04: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
1
HISTORY
1
HISTORY
|
|
@ -9,6 +9,7 @@ SnapRAID HISTORY
|
|||
It's just a cosmetic change, and not a functional one.
|
||||
* Remove unexpected 'Restore' entries in the diff output when dealing
|
||||
with filesystem without persistent inodes like NTFS in Linux.
|
||||
* Added support for filenames containing newlines. This happens in Mac OS X.
|
||||
|
||||
4.1 2013/9
|
||||
==========
|
||||
|
|
|
|||
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