mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
[Caja]: "Open Containing Folder" opens the file instead of the directory #4084
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#4084
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zaps166 on GitHub (Mar 24, 2016).
Hi!
opens the file instead of the directory with selected file (works properly with Nemo and Nautilus). This causes that the qBittorrent opens the file instead of the directory on Mate, so we have "Open" and "Open Containing Folder" which do the same thing. I suggest to remove the file name from the Caja command line in "Utils::Misc::openFolderSelect()".
Tested on:
@Chocobo1 commented on GitHub (Mar 24, 2016):
Hmm, caja is forked from Nautilus but in this case it works different... maybe this should be a bug in caja? why they changed the behavior? (clearly users would want caja to point to the file, otherwise they would just exec the file in cmdline)
(as you pointed out) it's really easy to *fix it at our side, but that won't be optimal for users.
@zaps166 commented on GitHub (Mar 24, 2016):
It looks like this commit:
github.com/mate-desktop/caja@f4efba80eeadd this "feautre" to Caja. Reverting this commit gives me an error message box, so event before Caja also can't open a directory and select the proper file.Maybe it is not a Caja bug (please read the commit message), but the different behavior between Caja and Nautilus/Nemo... ?
Btw. I think that this Caja behavior is strange, but this is how does the Caja work...
@chrishirst commented on GitHub (Mar 25, 2016):
Thunar does exactly the same (Linux Mint 17.3 XFCE4)
Which apparently was due to using an "old" OS version. (#3827)
@ngosang commented on GitHub (Mar 25, 2016):
Just tested Caja 1.12.6 in Archlinux and it's working fine.
Open => It opens a file
Open Containing Folder => It opens the folder
@zaps166 commented on GitHub (Mar 25, 2016):
On my ArchLinux (Caja 1.12.6) and new account (clean settings) qBittorrent opens a Gwenview (because it is a default file browser, I don't know why). Then if I change the default file browser in Mate Control Center to Caja, the qBittorrent executes "caja --no-desktop /path/to/file", so it opens a file instead of the directory (just tested again).
@ngosang please run in Mate environment
caja --no-desktop /path/to/file- how does it work on your OS ?qBittorrent works properly for Thunar, Dolphin, Gwenview, PCManFM, etc, but not for Caja...
@ngosang commented on GitHub (Mar 25, 2016):
I'm not using Mate environment, I'm using KDE 5 aka Plasma. I tried
caja --no-desktop /path/to/fileandcaja /path/to/fileand both are working. I see the folder.@zaps166 commented on GitHub (Mar 25, 2016):
@ngosang very strange, I've tried on KF5(Plasma) - the behaviour is the same: Caja opens file instead of folder... I've also tried Mate on Arch Linux with default setting - the same problem.
I can see tha Caja sources: https://github.com/mate-desktop/caja/blob/master/src/caja-main.c#L581 - it opens the file (if the path points to the existing file and not to the directory).
Maybe
g_app_info_launch_default_for_uri()works differently on your configuration?The example code how does the Caja work:
And the qmake project:
Could you try to run this example, please (if you have a time for this) :) ?
@ngosang commented on GitHub (Mar 25, 2016):
You are right
caja --no-desktop /home/me/open the foldercaja --no-desktop /home/me/file.txtopens the file.The thing is qBittorrent is working well for me because when I run:
I got =>
caja-2.desktopwhich is different tocaja-folder-handler.desktopdefined in https://github.com/qbittorrent/qBittorrent/blob/master/src/base/utils/misc.cpp#L595qBittorrent tries to open the folder with the default file manager. The file is not highlighted but it opens the containing folder. https://github.com/qbittorrent/qBittorrent/blob/master/src/base/utils/misc.cpp#L602
@Chocobo1 commented on GitHub (Mar 27, 2016):
@zaps166
I opened PR #5014, please take a look.
@zaps166 commented on GitHub (Mar 27, 2016):
@Chocobo1: PR is working properly for me!