summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-06-16 23:32:46 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2017-06-16 23:32:46 +0300
commitc89d9720f0bd3fa46cb812c110ba3534ca169567 (patch)
treee602159955ea4dbf7aab0d27b1afee6aa1ee1247 /editor
parentb7117ffda076a4ea5b6171ef23939cf89490990f (diff)
Fix EditorFileSystem duplicating root folder in new folders
Also, add some uninitialized variables into constructors (I like to applease cppcheck). Also, remove unused md_count. Fixes #3662.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_file_system.cpp7
-rw-r--r--editor/editor_file_system.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 64a9d5df82..f314f772d1 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -153,6 +153,7 @@ EditorFileSystemDirectory::EditorFileSystemDirectory() {
modified_time = 0;
parent = NULL;
+ verified = false;
}
EditorFileSystemDirectory::~EditorFileSystemDirectory() {
@@ -1040,7 +1041,10 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
if (idx == -1) {
//does not exist, create i guess?
EditorFileSystemDirectory *efsd = memnew(EditorFileSystemDirectory);
+
efsd->name = path[i];
+ efsd->parent = fs;
+
int idx2 = 0;
for (int j = 0; j < fs->get_subdir_count(); j++) {
@@ -1421,6 +1425,7 @@ EditorFileSystem::EditorFileSystem() {
singleton = this;
filesystem = memnew(EditorFileSystemDirectory); //like, empty
+ filesystem->parent = NULL;
thread = NULL;
scanning = false;
@@ -1429,7 +1434,9 @@ EditorFileSystem::EditorFileSystem() {
thread_sources = NULL;
new_filesystem = NULL;
+ abort_scan = false;
scanning_changes = false;
+ scanning_changes_done = false;
ResourceSaver::set_save_callback(_resource_saved);
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index b5d61d47d3..3522a1ab1d 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -168,8 +168,6 @@ class EditorFileSystem : public Node {
void _scan_fs_changes(EditorFileSystemDirectory *p_dir, const ScanProgress &p_progress);
- int md_count;
-
Set<String> valid_extensions;
Set<String> import_extensions;