Fix crash when trying to open Favorites externally
Updated FileSystemDock logic for opening selection in terminal/external program/file manager to return early when only Favorites is selected.
This commit is contained in:
parent
5b4cbd2299
commit
c31a20c33c
1 changed files with 9 additions and 0 deletions
|
|
@ -2214,6 +2214,9 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
|
|||
// Show the file/folder in the OS explorer.
|
||||
String fpath = current_path;
|
||||
if (current_path == "Favorites") {
|
||||
if (p_selected.is_empty()) {
|
||||
return;
|
||||
}
|
||||
fpath = p_selected[0];
|
||||
}
|
||||
|
||||
|
|
@ -2224,6 +2227,9 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
|
|||
case FILE_MENU_OPEN_EXTERNAL: {
|
||||
String fpath = current_path;
|
||||
if (current_path == "Favorites") {
|
||||
if (p_selected.is_empty()) {
|
||||
return;
|
||||
}
|
||||
fpath = p_selected[0];
|
||||
}
|
||||
|
||||
|
|
@ -2261,6 +2267,9 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
|
|||
case FILE_MENU_OPEN_IN_TERMINAL: {
|
||||
String fpath = current_path;
|
||||
if (current_path == "Favorites") {
|
||||
if (p_selected.is_empty()) {
|
||||
return;
|
||||
}
|
||||
fpath = p_selected[0];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue