File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1183,7 +1183,7 @@ void EditorFileSystem::_thread_func_sources(void *_userdata) {
11831183 sp.low = 0 ;
11841184 efs->_scan_fs_changes (efs->filesystem , sp);
11851185 }
1186- efs->scanning_changes_done = true ;
1186+ efs->scanning_changes_done . set () ;
11871187}
11881188
11891189void EditorFileSystem::scan_changes () {
@@ -1197,7 +1197,7 @@ void EditorFileSystem::scan_changes() {
11971197 _update_extensions ();
11981198 sources_changed.clear ();
11991199 scanning_changes = true ;
1200- scanning_changes_done = false ;
1200+ scanning_changes_done. clear () ;
12011201
12021202 if (!use_threads) {
12031203 if (filesystem) {
@@ -1216,7 +1216,7 @@ void EditorFileSystem::scan_changes() {
12161216 }
12171217 }
12181218 scanning_changes = false ;
1219- scanning_changes_done = true ;
1219+ scanning_changes_done. set () ;
12201220 emit_signal (SNAME (" sources_changed" ), sources_changed.size () > 0 );
12211221 } else {
12221222 ERR_FAIL_COND (thread_sources.is_started ());
@@ -1269,7 +1269,7 @@ void EditorFileSystem::_notification(int p_what) {
12691269 bool done_importing = false ;
12701270
12711271 if (scanning_changes) {
1272- if (scanning_changes_done) {
1272+ if (scanning_changes_done. is_set () ) {
12731273 set_process (false );
12741274
12751275 if (thread_sources.is_started ()) {
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ class EditorFileSystem : public Node {
231231
232232 Thread thread_sources;
233233 bool scanning_changes = false ;
234- bool scanning_changes_done = false ;
234+ SafeFlag scanning_changes_done;
235235
236236 static void _thread_func_sources (void *_userdata);
237237
You can’t perform that action at this time.
0 commit comments