summaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 3663bdee27..2467e1f722 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -325,14 +325,12 @@ void EditorFileSystem::_save_filesystem_cache() {
String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
FileAccess *f = FileAccess::open(fscache, FileAccess::WRITE);
- if (f == NULL) {
- ERR_PRINTS("Error writing fscache '" + fscache + "'.");
- } else {
- f->store_line(filesystem_settings_version_for_import);
- _save_filesystem_cache(filesystem, f);
- f->close();
- memdelete(f);
- }
+ ERR_FAIL_COND_MSG(!f, "Cannot create file '" + fscache + "'. Check user write permissions.");
+
+ f->store_line(filesystem_settings_version_for_import);
+ _save_filesystem_cache(filesystem, f);
+ f->close();
+ memdelete(f);
}
void EditorFileSystem::_thread_func(void *_userdata) {
@@ -1373,6 +1371,7 @@ void EditorFileSystem::_save_late_updated_files() {
//files that already existed, and were modified, need re-scanning for dependencies upon project restart. This is done via saving this special file
String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4");
FileAccessRef f = FileAccess::open(fscache, FileAccess::WRITE);
+ ERR_FAIL_COND_MSG(!f, "Cannot create file '" + fscache + "'. Check user write permissions.");
for (Set<String>::Element *E = late_update_files.front(); E; E = E->next()) {
f->store_line(E->get());
}