mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
fix: more working directory logic bugs
Some checks failed
Some checks failed
This commit is contained in:
parent
f7e555ea6b
commit
397ab0a6e5
|
|
@ -197,11 +197,9 @@ bool File::mkdirs() const {
|
||||||
return fs::is_directory(path, error);
|
return fs::is_directory(path, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
fs::create_directories(path, error);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return fs::create_directories(path, error);
|
return error.value() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -478,7 +478,7 @@ File Minecraft::getWorkingDirectory(const std::string& applicationName) {
|
||||||
|
|
||||||
if (!workingDirectory.exists()) {
|
if (!workingDirectory.exists()) {
|
||||||
if (!workingDirectory.mkdirs()) {
|
if (!workingDirectory.mkdirs()) {
|
||||||
Log::info("The working directory could not be created");
|
Log::info("The working directory could not be created.\n");
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue