mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
deploy-ng: fix crash when using local logfile in non-writable dir
Fixes #462
This commit is contained in:
parent
192913bf8e
commit
3124564040
@ -141,8 +141,8 @@ static int mkdir_parent(const wchar_t *path) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (buflen == 0) {
|
if (buflen == (size_t)-1 || buflen == 0) {
|
||||||
// There was no path separator.
|
// There was no path separator, or this was the root directory.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,8 +187,8 @@ static int mkdir_parent(const char *path) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (buflen == 0) {
|
if (buflen == (size_t)-1 || buflen == 0) {
|
||||||
// There was no path separator.
|
// There was no path separator, or this was the root directory.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (mkdir(buffer, 0755) == 0) {
|
if (mkdir(buffer, 0755) == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user