diff options
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r-- | editor/editor_file_system.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index eff2cf9ce5..dca32d7492 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1509,6 +1509,19 @@ void EditorFileSystem::_reimport_file(const String &p_file) { void EditorFileSystem::reimport_files(const Vector<String> &p_files) { + { //check that .import folder exists + DirAccess *da = DirAccess::open("res://"); + if (da->change_dir(".import") != OK) { + Error err = da->make_dir(".import"); + if (err) { + memdelete(da); + ERR_EXPLAIN("Failed to create 'res://.import' folder."); + ERR_FAIL_COND(err != OK); + } + } + memdelete(da); + } + importing = true; EditorProgress pr("reimport", TTR("(Re)Importing Assets"), p_files.size()); |