Преглед на файлове

Don't check modified time if file doesn't exist

(cherry picked from commit af069109bec8c6c60ae3c9e2d49084eeb3fdbbd3)
kobewi преди 4 години
родител
ревизия
56c0b39521
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      editor/editor_node.cpp

+ 2 - 1
editor/editor_node.cpp

@@ -818,7 +818,8 @@ void EditorNode::_scan_external_changes() {
 	// Check if any edited scene has changed.
 	// Check if any edited scene has changed.
 
 
 	for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
 	for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
-		if (editor_data.get_scene_path(i) == "") {
+		DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+		if (editor_data.get_scene_path(i) == "" || !da->file_exists(editor_data.get_scene_path(i))) {
 			continue;
 			continue;
 		}
 		}