Compare commits
9 Commits
00d625a697
...
3e5599e75c
Author | SHA1 | Date | |
---|---|---|---|
3e5599e75c | |||
d1ddf314d6 | |||
6ca131f8b9 | |||
393f3dfaca | |||
765df906fb | |||
62ac42ffc3 | |||
1461fffba8 | |||
73fbc37841 | |||
479016ab20 |
@ -10,8 +10,3 @@
|
|||||||
|
|
||||||
# Example: Adding a compiler flag. This will optimize the kernel aggressively (warning: untested, use at your own discretion).
|
# Example: Adding a compiler flag. This will optimize the kernel aggressively (warning: untested, use at your own discretion).
|
||||||
# target_compile_options(moon PRIVATE -O3)
|
# target_compile_options(moon PRIVATE -O3)
|
||||||
|
|
||||||
# Uncomment the line below to allow any filename on file/directory creation (by default, the kernel prohibits filenames with
|
|
||||||
# control characters, leading/trailing spaces, problematic characters and invalid UTF-8). Keep in mind that this restriction
|
|
||||||
# is only enforced when creating files; existing files with such illegal filenames are parsed correctly and fully usable.
|
|
||||||
# target_compile_definitions(moon PRIVATE MOON_DISABLE_FILENAME_RESTRICTIONS)
|
|
||||||
|
@ -101,11 +101,6 @@ namespace VFS
|
|||||||
|
|
||||||
Result<void> validate_filename(StringView name)
|
Result<void> validate_filename(StringView name)
|
||||||
{
|
{
|
||||||
#ifdef MOON_DISABLE_FILENAME_RESTRICTIONS
|
|
||||||
(void)name;
|
|
||||||
return {};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user