Tested versions
- Reproducible in: master (0fdb93c), Godot 4.0
System information
Godot v4.5.stable - macOS Tahoe (26.1.0) - Multi-window, 1 monitor - Metal (Forward+) - integrated Apple M3 Max (Apple9) - Apple M3 Max (16 threads) - 48.00 GiB memory
Issue description
EditorInterface::get_selected_paths() (which returns FileSystemDock::get_singleton()->get_selected_paths()) has a design flaw: it returns an array of paths (String), but it doesn't tell if the selected file was selected from the favorites or in the res:// tree.
It makes it possible to select "twice" a file (one favorite, and the same res:// file).

Steps to reproduce
- Create an
EditorScript script that prints EditorInterface.get_selected_paths()
- Favorite that script in the FileSystem dock.
- Select both the favorite item and the script in the
res:// tree
- Run the created editor script.
- See that the array returns the same path twice.
Minimal reproduction project (MRP)
112091.zip