I’m using the QSpace app as a replacement for finder and the “Reveal in Finder” feature doesn’t seem to be working with Popclip. The only thing that happens is that QSpace get’s focused but the directory doesn’t change. It should work since reveal in finder works in other apps like Raycast and using the open command in terminal also works correctly.
Any ideas how I could approach a solution for this?
Here is PopClip’s code that reveals the file/folder in Finder:
NSURL *standardizedURL=[[fileURL filePathURL] URLByStandardizingPath];
NSString *file=standardizedURL.path;
NSString *root=[standardizedURL URLByDeletingLastPathComponent].path;
if (standardizedURL.isReachableDirectoryOnlyURL) {
// if directory, open directory directly
file=nil;
root=standardizedURL.path;
}
[[NSWorkspace sharedWorkspace] selectFile:file inFileViewerRootedAtPath:root];
Docs for that call:
/* Activate the Finder and open a window selecting the file at the given path.
If fullPath is nil, this will instead open the directory specified by rootFullPath,
and not select any file.
If rootFullPath is the empty string (@""), the file is selected in the main viewer.
Otherwise, a new file viewer is opened.
*/
- (BOOL)selectFile:(nullable NSString *)fullPath inFileViewerRootedAtPath:(NSString *)rootFullPath;
This is a standard macOS API. I wonder what the Open command and Raycast are doing differently. If you or anyone has any insight please share. Meanwhile, I’ll note this on my tasks list for a deeper investigation.
A question, @asgeirtj . I’ve installed QSpace pro trial for testing. How to I set it to be the target of “Reveal in Finder” actions? (There are a LOT of settngs!!)