kernel: Do not forbid filenames starting with a hyphen
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Some programs on Linux seem to use those, better be careful.
This commit is contained in:
parent
3b4214c8be
commit
949321932f
@ -73,9 +73,6 @@ namespace VFS
|
|||||||
// Forbid problematic characters that could cause trouble in shell scripts and the like.
|
// Forbid problematic characters that could cause trouble in shell scripts and the like.
|
||||||
if (strpbrk(name.chars(), "*?:[]\"<>\\")) return err(EINVAL);
|
if (strpbrk(name.chars(), "*?:[]\"<>\\")) return err(EINVAL);
|
||||||
|
|
||||||
// Forbid filenames starting with a hyphen.
|
|
||||||
if (!name.is_empty() && name[0] == '-') return err(EINVAL);
|
|
||||||
|
|
||||||
// Forbid filenames with leading spaces.
|
// Forbid filenames with leading spaces.
|
||||||
if (!name.is_empty() && name[0] == ' ') return err(EINVAL);
|
if (!name.is_empty() && name[0] == ' ') return err(EINVAL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user