Fix DirAccessWindows::make_dir() choking on ".."
`CreateDirectoryW()` chokes on absolute paths that contain `..`
example: "C:\\workspace\\..\\games\\assets"
Simplifying the path before creating the dir fixes this.
(cherry picked from commit 0d3d5ac769
)
This commit is contained in:
parent
24eb91cd5b
commit
e1a39d66b0
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ Error DirAccessWindows::make_dir(String p_dir) {
|
||||||
if (p_dir.is_rel_path())
|
if (p_dir.is_rel_path())
|
||||||
p_dir = current_dir.plus_file(p_dir);
|
p_dir = current_dir.plus_file(p_dir);
|
||||||
|
|
||||||
p_dir = p_dir.replace("/", "\\");
|
p_dir = p_dir.simplify_path().replace("/", "\\");
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
int err;
|
int err;
|
||||||
|
|
Loading…
Reference in a new issue