mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -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
5
util.c
5
util.c
|
|
@ -58,9 +58,10 @@ int strgets(char* s, unsigned size, FILE* f)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* remove ending spaces */
|
||||
while (i != s && isspace(i[-1]))
|
||||
/* remove ending carrige return to support the Windows CR+LF format */
|
||||
if (i != s && i[-1] == '\r')
|
||||
--i;
|
||||
|
||||
*i = 0;
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue