Repository: godotengine/godot (language: cpp)

Issue:
[Editor] Favorite file managers not working with folders
### Tested versions

- Reproducible -> godot 4.4 beta 2, godot 4.4 beta 3
- No reproducible -> godot 4.3

### System information

Windows 10 - Godot 4.4 beta 3 - Compatibility Mode - Gtx 750

### Issue description

favorite folders in file system when double click not demonstrate de current favorite

### Steps to reproduce

- Download Godot 4.4 beta 3
- Make a folder
- Favorite the folder
- Double click folder
- Not working properly

### Minimal reproduction project (MRP)

Godot 4.3
![Image](https://github.com/user-attachments/assets/855622ef-9aa6-468d-8ebd-9ce23024cead)

Godot 4.4 beta 3
![Image](https://github.com/user-attachments/assets/30f954b0-84d2-4917-aada-edf5b9ad341a)


Discussion / hints:
Can confirm, happened somewhere between `dev5` and `dev6`, will bisect
Regression from:
* https://github.com/godotengine/godot/pull/100012

Probably unintended consequence, where navigating to the folder shouldn't happen for folders in general, but is useful for favorites, but might even then have been an unintended feature

CC @KoBeWi 
I would like to contribute to this issue as a first time contributor, would that be okay?
This is probably not a good first time contribution, it's a regression and should be investigated by people involving making the original change

I would suggest something else for your first contribution

Fix patch:
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 1cc374573127..19b27698c2ec 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1291,12 +1291,13 @@ void FileSystemDock::_tree_activate_file() {
 		String file_path = selected->get_metadata(0);
 		TreeItem *parent = selected->get_parent();
 		bool is_favorite = parent != nullptr && parent->get_metadata(0) == "Favorites";
+		bool is_folder = file_path.ends_with("/");
 
-		if ((!is_favorite && file_path.ends_with("/")) || file_path == "Favorites") {
+		if ((!is_favorite && is_folder) || file_path == "Favorites") {
 			bool collapsed = selected->is_collapsed();
 			selected->set_collapsed(!collapsed);
 		} else {
-			_select_file(file_path, is_favorite && !file_path.ends_with("/"), false);
+			_select_file(file_path, is_favorite && !is_folder, is_favorite && is_folder);
 		}
 	}
 }


Test patch: