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

The location is not a folder - Google Chrome / Mozilla Firefox #1536

Open
thedanyes opened this issue Jun 30, 2021 · 7 comments
Open

The location is not a folder - Google Chrome / Mozilla Firefox #1536

thedanyes opened this issue Jun 30, 2021 · 7 comments

Comments

@thedanyes
Copy link

Expected behaviour

I click 'Show in folder' in the 'Downloads' interface of Google Chrome. Caja opens to the relevant folder with that file highlighted. This works fine in Nautilus.

Actual behaviour

Caja opens to my home folder and pops up an error window indicating, "The location is not a folder."

Steps to reproduce the behaviour

Download a file in google chrome. Hit ctrl+j for 'downloads' interface. Click the 'Show in folder' link for the downloaded file.
caja_error

MATE general version

mate-desktop 1.24.0-2
mate-desktop-common 1.24.0-2
mate-user-guide 1.24.0-1

Package version

1.24.0-1

Linux Distribution

Ubuntu 20.04.2 with Unity-desktop (NOT MATE).

Link to bugreport of your Distribution (requirement)

@lukefromdc
Copy link
Member

This looks like Chrome is successfully invoking caja, but passing the filename of the downloaded item to caja rather than the name of the directory containing the file. Thus, this becomes the EXPECTED behavior of Caja if that's what Chrome (which I do not have installed) is asking it to do. If you type caja in terminal, and then drag and drop any file (not a directory) onto the terminal and hit return, you will see exactly the same behavior: the "location is not a folder" dialog, coming up as caja opens directories not files.

Nemo and Nautilus by comparison DO automatically open the parent directory of any file they are asked to open, with that file selected. Not sure whether that was ever the case in Nautilus in GNOME 2 (and later broken), was a feature added to Nautilus somewhere between the initial port to GTK3 for Nautilus 3.0 and Nautilus 3.4, which was forked to become Nemo, or was added to Nautilus still later and then ported to Nemo.

@thedanyes
Copy link
Author

Same happens with Firefox.

FYI Firefox version 90.0 64-bit (ubuntu package "90.0+build1-0ubuntu0.20.04.1").

@lukefromdc
Copy link
Member

lukefromdc commented Jul 27, 2021

That is no surprise: Caja does not currently support opening with a file as an argument, only with a directory as an argument. Browsers are trying to pass the filename, not the directory name to Caja, as this works with Nautilus and Nemo. I do not know when that was added to them, or if Nautilus 2/Caja once had this feature and it broke or got left behind in a code migration.

EDIT: If this was added to Nautilus and/or Nemo post-Nautilus 3.0, that commit could probably be ported to Caja

@thedanyes
Copy link
Author

The code seems to be from 10 years ago, if I'm reading this correctly.
https://github.com/mate-desktop/caja/blame/2c823efff95a07ac10948a6fcfd0fc05fe0fcd58/src/caja-window-manage-views.c#L2153

@lukefromdc
Copy link
Member

That code is simply the error message handling for when caja is given a non-file URL. Finding out when this was REMOVED from nautilus or nemo would find the commit there where this was fixed

@thedanyes
Copy link
Author

The code in question is still present in Nautilus, but doesn't get called in this situation. Here is a link to the function used to 'give' nautilus the parent folder so that the 'not a folder' error can be avoided. This is the oldest reference to this function that I can find on the Nautilus github and it appears it was added as a 'cleaning' commit? Maybe some Nautilus history is missing.

https://github.com/GNOME/nautilus/blame/3c66ac706569583c1c9adb9cb0f2e94a1a47ea77/src/nautilus-window-slot.c#L1258

@thedanyes
Copy link
Author

I can't imagine that everyone using the MATE Desktop with it's default file browser is subject to this same issue. Clicking the browser's 'show in folder' is not some isolated niche use case. Can anyone else replicate the issue from Chrome or Firefox?

@thedanyes thedanyes changed the title The location is not a folder - Google Chrome The location is not a folder - Google Chrome / Mozilla Firefox May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants