Fix creating editor data, config and cache paths
We used to abort if the system-specific data folder (e.g. `~/.local`
or `%APPDATA%`) is missing, but the next code chunk actually creates
it with `make_dir_recursive` if missing.
Fixes #26598.
(cherry picked from commit c0050d9295
)
This commit is contained in:
parent
41cda84b11
commit
733668074a
|
@ -737,12 +737,6 @@ void EditorSettings::create() {
|
||||||
// Validate/create data dir and subdirectories
|
// Validate/create data dir and subdirectories
|
||||||
|
|
||||||
dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||||
if (dir->change_dir(data_path) != OK) {
|
|
||||||
ERR_PRINT("Cannot find path for data directory!");
|
|
||||||
memdelete(dir);
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dir->change_dir(data_dir) != OK) {
|
if (dir->change_dir(data_dir) != OK) {
|
||||||
dir->make_dir_recursive(data_dir);
|
dir->make_dir_recursive(data_dir);
|
||||||
if (dir->change_dir(data_dir) != OK) {
|
if (dir->change_dir(data_dir) != OK) {
|
||||||
|
|
Loading…
Reference in New Issue