diff options
| author | Marcelo Fernandez | 2018-03-10 16:47:10 -0300 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-04-15 01:17:01 +0200 |
| commit | c2e02e2066a2f151d971662a139be85b079717cc (patch) | |
| tree | 045cb9fffc05712df8fbc911e8d34362d0228701 | |
| parent | 3503ee4be643c10bbef95b08985c12937d0f1b12 (diff) | |
| download | godot-c2e02e2066a2f151d971662a139be85b079717cc.tar.gz godot-c2e02e2066a2f151d971662a139be85b079717cc.tar.zst godot-c2e02e2066a2f151d971662a139be85b079717cc.zip | |
| -rw-r--r-- | editor/editor_file_system.cpp | 20 | ||||
| -rw-r--r-- | editor/editor_settings.cpp | 7 |
2 files changed, 16 insertions, 11 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 1e919a6ce..b11f1f71a 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -275,9 +275,13 @@ void EditorFileSystem::_scan_filesystem() { memdelete(d); f = FileAccess::open(fscache, FileAccess::WRITE); - _save_filesystem_cache(new_filesystem, f); - f->close(); - memdelete(f); + if (f == NULL) { + ERR_PRINTS("Error writing fscache: " + fscache); + } else { + _save_filesystem_cache(new_filesystem, f); + f->close(); + memdelete(f); + } scanning = false; } @@ -286,9 +290,13 @@ void EditorFileSystem::_save_filesystem_cache() { String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_cache3"); FileAccess *f = FileAccess::open(fscache, FileAccess::WRITE); - _save_filesystem_cache(filesystem, f); - f->close(); - memdelete(f); + if (f == NULL) { + ERR_PRINTS("Error writing fscache: " + fscache); + } else { + _save_filesystem_cache(filesystem, f); + f->close(); + memdelete(f); + } } void EditorFileSystem::_thread_func(void *_userdata) { diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index b9aa3997d..2cf1c513f 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -942,11 +942,8 @@ void EditorSettings::save() { Error err = ResourceSaver::save(singleton->config_file_path, singleton); if (err != OK) { - ERR_PRINT("Can't Save!"); - return; - } - - if (OS::get_singleton()->is_stdout_verbose()) { + ERR_PRINTS("Error saving editor settings to " + singleton->config_file_path); + } else if (OS::get_singleton()->is_stdout_verbose()) { print_line("EditorSettings Save OK!"); } } |
