Repository: godot
Issue: Crash when duplicating file with Ctrl+Drag and drop
Labels: bug,topic:editor,crash,regression

### Tested versions

4.4 dev7, dev6, didn't test earlier

### System information

W10

### Issue description

```
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.4.dev.custom_build (d2ada64a03d2abdb97cafe8f10623db8a2ce1d4c)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] std::_Atomic_storage<unsigned __int64,8>::load (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\atomic:1121)
[1] std::_Atomic_storage<unsigned __int64,8>::load (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\atomic:1121)
[2] SafeNumeric<unsigned __int64>::conditional_increment (C:\godot_source\core\templates\safe_refcount.h:139)
[3] CowData<char32_t>::_ref (C:\godot_source\core\templates\cowdata.h:502)
[4] String::String (C:\godot_source\core\string\ustring.h:602)
[5] EditorFileSystemDirectory::get_file (C:\godot_source\editor\editor_file_system.cpp:94)
[6] EditorFileSystemDirectory::get_file_path (C:\godot_source\editor\editor_file_system.cpp:126)
[7] EditorFileSystem::_update_scan_actions (C:\godot_source\editor\editor_file_system.cpp:847)
[8] EditorFileSystem::_notification (C:\godot_source\editor\editor_file_system.cpp:1714)
[9] EditorFileSystem::_notificationv (C:\godot_source\editor\editor_file_system.h:145)
[10] Object::notification (C:\godot_source\core\object\object.cpp:883)
[11] SceneTree::_process_group (C:\godot_source\scene\main\scene_tree.cpp:1063)
[12] SceneTree::_process (C:\godot_source\scene\main\scene_tree.cpp:1140)
[13] SceneTree::process (C:\godot_source\scene\main\scene_tree.cpp:580)
[14] Main::iteration (C:\godot_source\main\main.cpp:4493)
[15] ProgressDialog::_update_ui (C:\godot_source\editor\progress_dialog.cpp:135)
[16] ProgressDialog::task_step (C:\godot_source\editor\progress_dialog.cpp:222)
[17] EditorNode::progress_task_step (C:\godot_source\editor\editor_node.cpp:4965)
[18] EditorProgress::step (C:\godot_source\editor\editor_node.cpp:180)
[19] EditorFileSystem::reimport_files (C:\godot_source\editor\editor_file_system.cpp:3118)
[20] EditorFileSystem::_update_scan_actions (C:\godot_source\editor\editor_file_system.cpp:963)
[21] EditorFileSystem::_refresh_filesystem (C:\godot_source\editor\editor_file_system.cpp:3044)
[22] call_with_variant_args_helper<EditorFileSystem> (C:\godot_source\core\variant\binder_common.h:320)
[23] call_with_variant_args<EditorFileSystem> (C:\godot_source\core\variant\binder_common.h:430)
[24] CallableCustomMethodPointer<EditorFileSystem,void>::call (C:\godot_source\core\object\callable_method_pointer.h:109)
[25] Callable::callp (C:\godot_source\core\variant\callable.cpp:58)
[26] Object::emit_signalp (C:\godot_source\core\object\object.cpp:1206)
[27] Object::emit_signal<> (C:\godot_source\core\object\object.h:926)
[28] SceneTree::process (C:\godot_source\scene\main\scene_tree.cpp:574)
[29] Main::iteration (C:\godot_source\main\main.cpp:4493)
[30] OS_Windows::run (C:\godot_source\platform\windows\os_windows.cpp:2062)
[31] widechar_main (C:\godot_source\platform\windows\godot_windows.cpp:181)
[32] _main (C:\godot_source\platform\windows\godot_windows.cpp:206)
[33] main (C:\godot_source\platform\windows\godot_windows.cpp:220)
[34] WinMain (C:\godot_source\platform\windows\godot_windows.cpp:234)
[35] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[36] <couldn't map PC to fn name>
-- END OF BACKTRACE --
```
Alternatively this error will appear:
```
ERROR: Condition "idx == -1" is true. Continuing.
   at: EditorFileSystem::_update_scan_actions (C:\godot_source\editor/editor_file_system.cpp:899)
ERROR: Attempted to call reimport_files() recursively, this is not allowed.
   at: (C:\godot_source\editor/editor_file_system.cpp:3055)
```

### Steps to reproduce

1. Have any PNG file in your project
2. Drag and drop it to another directory while holding Ctrl
3. Either crash or error

### Minimal reproduction project (MRP)

N/A