[Windows] Fix windows is_path_invalid, and apply it to directory creation.
This commit is contained in:
parent
41564aaf77
commit
be8f60a78d
3 changed files with 11 additions and 7 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#if defined(WINDOWS_ENABLED)
|
||||
|
||||
#include "dir_access_windows.h"
|
||||
#include "file_access_windows.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/os/memory.h"
|
||||
|
|
@ -177,6 +178,13 @@ Error DirAccessWindows::make_dir(String p_dir) {
|
|||
p_dir = fix_path(p_dir);
|
||||
}
|
||||
|
||||
if (FileAccessWindows::is_path_invalid(p_dir)) {
|
||||
#ifdef DEBUG_ENABLED
|
||||
WARN_PRINT("The path :" + p_dir + " is a reserved Windows system pipe, so it can't be used for creating directories.");
|
||||
#endif
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
p_dir = p_dir.simplify_path().replace("/", "\\");
|
||||
|
||||
bool success;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue