You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
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.
(cherry picked from commit c89d9720f0)
This commit is contained in:
committed by
Rémi Verschelde
parent
bc7ceebc19
commit
9c44d72b3c
@@ -207,6 +207,7 @@ EditorFileSystemDirectory::EditorFileSystemDirectory() {
|
||||
|
||||
modified_time = 0;
|
||||
parent = NULL;
|
||||
verified = false;
|
||||
}
|
||||
|
||||
EditorFileSystemDirectory::~EditorFileSystemDirectory() {
|
||||
@@ -1038,7 +1039,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++) {
|
||||
|
||||
@@ -1252,6 +1256,7 @@ EditorFileSystem::EditorFileSystem() {
|
||||
|
||||
singleton = this;
|
||||
filesystem = memnew(EditorFileSystemDirectory); //like, empty
|
||||
filesystem->parent = NULL;
|
||||
|
||||
thread = NULL;
|
||||
scanning = false;
|
||||
@@ -1259,7 +1264,9 @@ EditorFileSystem::EditorFileSystem() {
|
||||
thread_sources = NULL;
|
||||
new_filesystem = NULL;
|
||||
|
||||
abort_scan = false;
|
||||
scanning_sources = false;
|
||||
scanning_sources_done = false;
|
||||
ResourceSaver::set_save_callback(_resource_saved);
|
||||
|
||||
List<String> extensionsl;
|
||||
|
||||
@@ -193,8 +193,6 @@ class EditorFileSystem : public Node {
|
||||
|
||||
void _scan_fs_changes(EditorFileSystemDirectory *p_dir, const ScanProgress &p_progress);
|
||||
|
||||
int md_count;
|
||||
|
||||
Set<String> valid_extensions;
|
||||
|
||||
void _scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess *da, const ScanProgress &p_progress);
|
||||
|
||||
Reference in New Issue
Block a user