Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Error when trying to open file with "Files" file explorer #3217

Open
2 tasks done
xsidexpt opened this issue Jan 31, 2025 · 6 comments
Open
2 tasks done

BUG: Error when trying to open file with "Files" file explorer #3217

xsidexpt opened this issue Jan 31, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@xsidexpt
Copy link

xsidexpt commented Jan 31, 2025

Checks

  • I have checked that this issue has not already been reported.

  • I am using the latest version of Flow Launcher.

Problem Description

Basically when I switch my default file explorer to Files, and try to search for a folder and click open, this message popped up

2025-01-31.txt

To Reproduce

  1. change default file explorer to "files"
  2. search any folder and click enter to open

Screenshots

No response

Flow Launcher Version

1.19.5

Windows Build Number

Version 10.0.26100.3037

Error Log

Flow Launcher version: 1.19.5
OS Version: 26100.3037
IntPtr Length: 8
x64: True

Python Path: C:\Users\xside\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path: 
Date: 01/31/2025 12:31:25
Exception:
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'Files' with working directory 'C:\Users\xside\AppData\Local\FlowLauncher\app-1.19.5'. The system cannot find the file specified.
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at Flow.Launcher.PublicAPIInstance.OpenDirectory(String DirectoryPath, String FileNameOrFilePath) in C:\projects\flow-launcher\Flow.Launcher\PublicAPIInstance.cs:line 246
   at Flow.Launcher.Plugin.Explorer.Search.ResultManager.OpenFolder(String folderPath, String fileNameOrFilePath) in C:\projects\flow-launcher\Plugins\Flow.Launcher.Plugin.Explorer\Search\ResultManager.cs:line 346
   at Flow.Launcher.Plugin.Explorer.Search.ResultManager.<>c__DisplayClass14_0.<CreateOpenCurrentFolderResult>b__0(ActionContext c) in C:\projects\flow-launcher\Plugins\Flow.Launcher.Plugin.Explorer\Search\ResultManager.cs:line 263
   at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /_/Flow.Launcher.Plugin/Result.cs:line 246
   at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 389
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@xsidexpt xsidexpt added the bug Something isn't working label Jan 31, 2025
@deefrawley
Copy link
Member

What settings did you add for the Files application (path and args)?

@deefrawley deefrawley mentioned this issue Jan 31, 2025
2 tasks
@xsidexpt
Copy link
Author

xsidexpt commented Feb 1, 2025

I didn't add anything, simply selected the default preset
If I manually provide a path for the files.exe it will not present that error, but it will also not properly search for the folder or file. It will add the path of the .exe before the actual file location.
I have used the files app as the default file explorer in the recent past and didn't touch the default settings since then, but wasn't super happy with certain parts of the app so went back to regular explorer. This file search from glow launcher worked then, but it doesn't now.

Image

@deefrawley
Copy link
Member

It would appear that Files doesn't have command line arguments so can't be launched the way Flow wants, but happy for a core dev to confirm.

files-community/Files#13021

@xsidexpt
Copy link
Author

xsidexpt commented Feb 2, 2025

Just a couple of months ago I tried this search with files and got a semi working search, it was a little annoying because it would always open the directory and not the subdirectory I selected (Like if I select C:\downloads it would open C:\ with the downloads folders selected) but now it simply does not work at all?
Regardless it seems like it might be something outside of flow launcher

@DBradleyRI
Copy link

I just resolved this from the Files team. In File Manager Path, it needs to change to "Files-Stable". It should work fine then.

Reference: files-community/Files#16779 (comment)

@xsidexpt
Copy link
Author

xsidexpt commented Feb 5, 2025

I just resolved this from the Files team. In File Manager Path, it needs to change to "Files-Stable". It should work fine then.

Reference: files-community/Files#16779 (comment)

This is the solution!

Also, if anyone else is on the same boat as I was where you didn't like the default behavior for searching a folder on flow launcher and having it open in Files (it didn't actually open the folder, but instead it would open the directory where the folder is with the folder selected) simply change the "Arg for folder" line from -select "%d" to simple "%d" and the behavior will mimic what happens with regular Windows explorer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants