QT, KDE: single file torrent, "open folder" opens the file

Discussion of Transmission that doesn't fit in the other categories
Post Reply
basinilya
Posts: 11
Joined: Sat Dec 15, 2012 7:52 pm

QT, KDE: single file torrent, "open folder" opens the file

Post by basinilya »

If I click "open folder" on a single file torrent, it opens the file, not the folder; Kwrite for .txt and Gwenview for images.
transmission-qt 2.73 (13592)
KDE 4.9.4
Archlinux 64
basinilya
Posts: 11
Joined: Sat Dec 15, 2012 7:52 pm

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by basinilya »

http://www.transmissionbt.com/download/
broken links:
transmission--2.75.tar: xz, bz2.

Rebuilt from svn tag 2.75
Same problem

Code: Select all

[il@il transmission]$ strace -f -e trace=process -v -s 1024 transmission-qt
execve("/usr/bin/transmission-qt", ["transmission-qt"], ["XDG_VTNR=7", "SSH_AGENT_PID=1493", "XDG_SESSION_ID=2", "KDE_MULTIHEAD=false", "DM_CONTROL=/var/run/xdmctl", "XDG_DATA_HOME=/home/il/.local/share", "GPG_AGENT_INFO=/tmp/gpg-vZpodK/S.gpg-agent:1490:1", "SHELL=/bin/bash", "TERM=xterm", "XDM_MANAGED=method=classic", "GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/il/.gtkrc-2.0:/home/il/.kde4/share/config/gtkrc-2.0", "KONSOLE_DBUS_SERVICE=:1.77", "KONSOLE_PROFILE_NAME=Shell", "GS_LIB=/home/il/.fonts", "GTK_RC_FILES=/etc/gtk/gtkrc:/home/il/.gtkrc:/home/il/.kde4/share/config/gtkrc", "WINDOWID=62914587", "SHELL_SESSION_ID=d9eaa10be5bc40008ded63c43faee175", "GTK_MODULES=canberra-gtk-module", "KDE_FULL_SESSION=true", "USER=il", "SSH_AUTH_SOCK=/tmp/ssh-AStYMTrFWSYs/agent.1492", "SESSION_MANAGER=local/il:@/tmp/.ICE-unix/1527,unix/il:/tmp/.ICE-unix/1527", "MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins", "XDG_CONFIG_DIRS=/etc/xdg", "DESKTOP_SESSION=default", "MAIL=/var/spool/mail/il", "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl", "PWD=/.snapshots/persist/builds/transmission", "JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre", "KONSOLE_DBUS_WINDOW=/Windows/1", "KDE_SESSION_UID=1000", "LANG=en_US.utf8", "KONSOLE_DBUS_SESSION=/Sessions/1", "HOME=/home/il", "COLORFGBG=15;0", "XDG_SEAT=seat0", "SHLVL=2", "XDG_CONFIG_HOME=/home/il/.config", "KDE_SESSION_VERSION=4", "LANGUAGE=", "XCURSOR_THEME=Oxygen_White", "XDG_CACHE_HOME=/home/il/.cache", "LOGNAME=il", "XDG_DATA_DIRS=/usr/local/share/:/usr/share/", "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FjwkPwtZFT,guid=60b1a1958dd582f5fe65748b50cd90f9", "WINDOWPATH=7", "PROFILEHOME=", "XDG_RUNTIME_DIR=/run/user/1000", "DISPLAY=:0", "QT_PLUGIN_PATH=/home/il/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/", "J2REDIR=/usr/lib/jvm/java-7-openjdk/jre", "_=/usr/bin/strace", "OLDPWD=/.snapshots/persist/builds/transmission/svn"]) = 0
arch_prctl(ARCH_SET_FS, 0x7ff9a6d13780) = 0
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
clone(child_stack=0x7ff9951caf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff9951cb9d0, tls=0x7ff9951cb700, child_tidptr=0x7ff9951cb9d0) = 18106
Process 18106 attached
[pid 18106] clone(Process 18107 attached
child_stack=0x7ff9949c9f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff9949ca9d0, tls=0x7ff9949ca700, child_tidptr=0x7ff9949ca9d0) = 18107
[pid 18106] clone(Process 18108 attached
child_stack=0x7ff98fffef70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff98ffff9d0, tls=0x7ff98ffff700, child_tidptr=0x7ff98ffff9d0) = 18108
[pid 18104] clone(child_stack=0x7ff98f7fdf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff98f7fe9d0, tls=0x7ff98f7fe700, child_tidptr=0x7ff98f7fe9d0) = 18109
Process 18109 attached
[pid 18104] clone(child_stack=0x7ff98e980f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff98e9819d0, tls=0x7ff98e981700, child_tidptr=0x7ff98e9819d0) = 18110
Process 18110 attached
[pid 18110] clone(Process 18111 attached
child_stack=0x7ff98e17ff70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff98e1809d0, tls=0x7ff98e180700, child_tidptr=0x7ff98e1809d0) = 18111
[pid 18107] clone(Process 18112 attached
child_stack=0x7ff98cebbf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff98cebc9d0, tls=0x7ff98cebc700, child_tidptr=0x7ff98cebc9d0) = 18112
[pid 18107] clone(child_stack=0x7ff97bffef70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff97bfff9d0, tls=0x7ff97bfff700, child_tidptr=0x7ff97bfff9d0) = 18113
Process 18113 attached
[pid 18112] _exit(0)                    = ?
[pid 18112] +++ exited with 0 +++
[pid 18113] _exit(0)                    = ?
[pid 18113] +++ exited with 0 +++


"open folder"


[pid 18104] clone(child_stack=0x7ff97bffef70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff97bfff9d0, tls=0x7ff97bfff700, child_tidptr=0x7ff97bfff9d0) = 18114
[pid 18104] clone(Process 18115 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff9a6d13a50) = 18115
Process 18114 attached
[pid 18115] clone(Process 18116 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff9a6d13a50) = 18116
[pid 18115] exit_group(1)               = ?
[pid 18115] +++ exited with 1 +++
[pid 18104] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18115, si_status=1, si_utime=0, si_stime=0} ---
[pid 18116] execve("/usr/local/bin/xdg-open", ["/usr/local/bin/xdg-open", "file:///media/distrpart/Downloads/utorrent/test.png"], ["XDG_VTNR=7", "SSH_AGENT_PID=1493", "XDG_SESSION_ID=2", "KDE_MULTIHEAD=false", "DM_CONTROL=/var/run/xdmctl", "XDG_DATA_HOME=/home/il/.local/share", "GPG_AGENT_INFO=/tmp/gpg-vZpodK/S.gpg-agent:1490:1", "SHELL=/bin/bash", "TERM=xterm", "XDM_MANAGED=method=classic", "GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/il/.gtkrc-2.0:/home/il/.kde4/share/config/gtkrc-2.0", "KONSOLE_DBUS_SERVICE=:1.77", "KONSOLE_PROFILE_NAME=Shell", "GS_LIB=/home/il/.fonts", "GTK_RC_FILES=/etc/gtk/gtkrc:/home/il/.gtkrc:/home/il/.kde4/share/config/gtkrc", "WINDOWID=62914587", "SHELL_SESSION_ID=d9eaa10be5bc40008ded63c43faee175", "GTK_MODULES=canberra-gtk-module", "KDE_FULL_SESSION=true", "USER=il", "SSH_AUTH_SOCK=/tmp/ssh-AStYMTrFWSYs/agent.1492", "SESSION_MANAGER=local/il:@/tmp/.ICE-unix/1527,unix/il:/tmp/.ICE-unix/1527", "MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins", "XDG_CONFIG_DIRS=/etc/xdg", "DESKTOP_SESSION=default", "MAIL=/var/spool/mail/il", "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl", "PWD=/.snapshots/persist/builds/transmission", "JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre", "KONSOLE_DBUS_WINDOW=/Windows/1", "KDE_SESSION_UID=1000", "LANG=en_US.utf8", "KONSOLE_DBUS_SESSION=/Sessions/1", "HOME=/home/il", "COLORFGBG=15;0", "XDG_SEAT=seat0", "SHLVL=2", "XDG_CONFIG_HOME=/home/il/.config", "KDE_SESSION_VERSION=4", "LANGUAGE=", "XCURSOR_THEME=Oxygen_White", "XDG_CACHE_HOME=/home/il/.cache", "LOGNAME=il", "XDG_DATA_DIRS=/usr/local/share/:/usr/share/", "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FjwkPwtZFT,guid=60b1a1958dd582f5fe65748b50cd90f9", "WINDOWPATH=7", "PROFILEHOME=", "XDG_RUNTIME_DIR=/run/user/1000", "DISPLAY=:0", "QT_PLUGIN_PATH=/home/il/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/", "J2REDIR=/usr/lib/jvm/java-7-openjdk/jre", "_=/usr/bin/strace", "OLDPWD=/.snapshots/persist/builds/transmission/svn"]) = -1 ENOENT (No such file or directory)
[pid 18116] execve("/usr/bin/xdg-open", ["/usr/bin/xdg-open", "file:///media/distrpart/Downloads/utorrent/test.png"], ["XDG_VTNR=7", "SSH_AGENT_PID=1493", "XDG_SESSION_ID=2", "KDE_MULTIHEAD=false", "DM_CONTROL=/var/run/xdmctl", "XDG_DATA_HOME=/home/il/.local/share", "GPG_AGENT_INFO=/tmp/gpg-vZpodK/S.gpg-agent:1490:1", "SHELL=/bin/bash", "TERM=xterm", "XDM_MANAGED=method=classic", "GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/il/.gtkrc-2.0:/home/il/.kde4/share/config/gtkrc-2.0", "KONSOLE_DBUS_SERVICE=:1.77", "KONSOLE_PROFILE_NAME=Shell", "GS_LIB=/home/il/.fonts", "GTK_RC_FILES=/etc/gtk/gtkrc:/home/il/.gtkrc:/home/il/.kde4/share/config/gtkrc", "WINDOWID=62914587", "SHELL_SESSION_ID=d9eaa10be5bc40008ded63c43faee175", "GTK_MODULES=canberra-gtk-module", "KDE_FULL_SESSION=true", "USER=il", "SSH_AUTH_SOCK=/tmp/ssh-AStYMTrFWSYs/agent.1492", "SESSION_MANAGER=local/il:@/tmp/.ICE-unix/1527,unix/il:/tmp/.ICE-unix/1527", "MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins", "XDG_CONFIG_DIRS=/etc/xdg", "DESKTOP_SESSION=default", "MAIL=/var/spool/mail/il", "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl", "PWD=/.snapshots/persist/builds/transmission", "JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre", "KONSOLE_DBUS_WINDOW=/Windows/1", "KDE_SESSION_UID=1000", "LANG=en_US.utf8", "KONSOLE_DBUS_SESSION=/Sessions/1", "HOME=/home/il", "COLORFGBG=15;0", "XDG_SEAT=seat0", "SHLVL=2", "XDG_CONFIG_HOME=/home/il/.config", "KDE_SESSION_VERSION=4", "LANGUAGE=", "XCURSOR_THEME=Oxygen_White", "XDG_CACHE_HOME=/home/il/.cache", "LOGNAME=il", "XDG_DATA_DIRS=/usr/local/share/:/usr/share/", "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FjwkPwtZFT,guid=60b1a1958dd582f5fe65748b50cd90f9", "WINDOWPATH=7", "PROFILEHOME=", "XDG_RUNTIME_DIR=/run/user/1000", "DISPLAY=:0", "QT_PLUGIN_PATH=/home/il/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/", "J2REDIR=/usr/lib/jvm/java-7-openjdk/jre", "_=/usr/bin/strace", "OLDPWD=/.snapshots/persist/builds/transmission/svn"]) = 0
[pid 18104] wait4(18115, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 18115
[pid 18116] arch_prctl(ARCH_SET_FS, 0x7fa058ab2700) = 0
[pid 18116] clone(Process 18117 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fa058ab29d0) = 18117
[pid 18116] wait4(-1,  <unfinished ...>
[pid 18117] execve("/usr/bin/kde-open", ["kde-open", "-v"], ["XDG_VTNR=7", "KDE_MULTIHEAD=false", "XDG_SESSION_ID=2", "SSH_AGENT_PID=1493", "DM_CONTROL=/var/run/xdmctl", "XDG_DATA_HOME=/home/il/.local/share", "GPG_AGENT_INFO=/tmp/gpg-vZpodK/S.gpg-agent:1490:1", "TERM=xterm", "SHELL=/bin/bash", "XDM_MANAGED=method=classic", "KONSOLE_DBUS_SERVICE=:1.77", "GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/il/.gtkrc-2.0:/home/il/.kde4/share/config/gtkrc-2.0", "KONSOLE_PROFILE_NAME=Shell", "GTK_RC_FILES=/etc/gtk/gtkrc:/home/il/.gtkrc:/home/il/.kde4/share/config/gtkrc", "GS_LIB=/home/il/.fonts", "WINDOWID=62914587", "SHELL_SESSION_ID=d9eaa10be5bc40008ded63c43faee175", "GTK_MODULES=canberra-gtk-module", "KDE_FULL_SESSION=true", "USER=il", "SSH_AUTH_SOCK=/tmp/ssh-AStYMTrFWSYs/agent.1492", "SESSION_MANAGER=local/il:@/tmp/.ICE-unix/1527,unix/il:/tmp/.ICE-unix/1527", "MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins", "XDG_CONFIG_DIRS=/etc/xdg", "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl", "MAIL=/var/spool/mail/il", "DESKTOP_SESSION=default", "PWD=/.snapshots/persist/builds/transmission", "JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre", "KONSOLE_DBUS_WINDOW=/Windows/1", "LANG=en_US.utf8", "KDE_SESSION_UID=1000", "KONSOLE_DBUS_SESSION=/Sessions/1", "SHLVL=3", "XDG_SEAT=seat0", "COLORFGBG=15;0", "HOME=/home/il", "LANGUAGE=", "KDE_SESSION_VERSION=4", "XDG_CONFIG_HOME=/home/il/.config", "XCURSOR_THEME=Oxygen_White", "XDG_CACHE_HOME=/home/il/.cache", "LOGNAME=il", "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FjwkPwtZFT,guid=60b1a1958dd582f5fe65748b50cd90f9", "XDG_DATA_DIRS=/usr/local/share/:/usr/share/", "WINDOWPATH=7", "DISPLAY=:0", "XDG_RUNTIME_DIR=/run/user/1000", "PROFILEHOME=", "QT_PLUGIN_PATH=/home/il/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/", "J2REDIR=/usr/lib/jvm/java-7-openjdk/jre", "_=/usr/bin/kde-open"]) = 0
[pid 18117] arch_prctl(ARCH_SET_FS, 0x7fe131b11780) = 0
[pid 18117] exit_group(0)               = ?
[pid 18117] +++ exited with 0 +++
[pid 18116] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 18117
[pid 18116] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18117, si_status=0, si_utime=1, si_stime=0} ---
[pid 18116] wait4(-1, 0x7fffd8f900d8, WNOHANG, NULL) = -1 ECHILD (No child processes)
[pid 18116] clone(Process 18118 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fa058ab29d0) = 18118
[pid 18116] wait4(-1,  <unfinished ...>
[pid 18118] execve("/usr/bin/kde-open", ["kde-open", "file:///media/distrpart/Downloads/utorrent/test.png"], ["XDG_VTNR=7", "KDE_MULTIHEAD=false", "XDG_SESSION_ID=2", "SSH_AGENT_PID=1493", "DM_CONTROL=/var/run/xdmctl", "XDG_DATA_HOME=/home/il/.local/share", "GPG_AGENT_INFO=/tmp/gpg-vZpodK/S.gpg-agent:1490:1", "TERM=xterm", "SHELL=/bin/bash", "XDM_MANAGED=method=classic", "KONSOLE_DBUS_SERVICE=:1.77", "GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/il/.gtkrc-2.0:/home/il/.kde4/share/config/gtkrc-2.0", "KONSOLE_PROFILE_NAME=Shell", "GTK_RC_FILES=/etc/gtk/gtkrc:/home/il/.gtkrc:/home/il/.kde4/share/config/gtkrc", "GS_LIB=/home/il/.fonts", "WINDOWID=62914587", "SHELL_SESSION_ID=d9eaa10be5bc40008ded63c43faee175", "GTK_MODULES=canberra-gtk-module", "KDE_FULL_SESSION=true", "USER=il", "SSH_AUTH_SOCK=/tmp/ssh-AStYMTrFWSYs/agent.1492", "SESSION_MANAGER=local/il:@/tmp/.ICE-unix/1527,unix/il:/tmp/.ICE-unix/1527", "MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins", "XDG_CONFIG_DIRS=/etc/xdg", "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl", "MAIL=/var/spool/mail/il", "DESKTOP_SESSION=default", "PWD=/.snapshots/persist/builds/transmission", "JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre", "KONSOLE_DBUS_WINDOW=/Windows/1", "LANG=en_US.utf8", "KDE_SESSION_UID=1000", "KONSOLE_DBUS_SESSION=/Sessions/1", "SHLVL=3", "XDG_SEAT=seat0", "COLORFGBG=15;0", "HOME=/home/il", "LANGUAGE=", "KDE_SESSION_VERSION=4", "XDG_CONFIG_HOME=/home/il/.config", "XCURSOR_THEME=Oxygen_White", "XDG_CACHE_HOME=/home/il/.cache", "LOGNAME=il", "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FjwkPwtZFT,guid=60b1a1958dd582f5fe65748b50cd90f9", "XDG_DATA_DIRS=/usr/local/share/:/usr/share/", "WINDOWPATH=7", "DISPLAY=:0", "XDG_RUNTIME_DIR=/run/user/1000", "PROFILEHOME=", "QT_PLUGIN_PATH=/home/il/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/", "J2REDIR=/usr/lib/jvm/java-7-openjdk/jre", "_=/usr/bin/kde-open"]) = 0
[pid 18118] arch_prctl(ARCH_SET_FS, 0x7ffc79183780) = 0
[pid 18118] exit_group(0)               = ?
[pid 18118] +++ exited with 0 +++
[pid 18116] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 18118
[pid 18116] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18118, si_status=0, si_utime=3, si_stime=2} ---
[pid 18116] wait4(-1, 0x7fffd8f900d8, WNOHANG, NULL) = -1 ECHILD (No child processes)
[pid 18116] exit_group(0)               = ?
[pid 18116] +++ exited with 0 +++






[pid 18111] _exit(0)                    = ?
[pid 18111] +++ exited with 0 +++
[pid 18107] clone(child_stack=0x7ff98e17ff70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff98e1809d0, tls=0x7ff98e180700, child_tidptr=0x7ff98e1809d0) = 18131
Process 18131 attached
[pid 18131] _exit(0)                    = ?
[pid 18131] +++ exited with 0 +++
Looks like transmission launches xdg-open with the .png file as argument
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by rb07 »

The "problem" was introduced by me in the patch for Ticket #4824, which adds going one level down in the "Open Folder" function, and selecting the torrent's file or directory. The change does take into consideration if its a one file torrent, or a directory with multiple files (a directory with one file is treated the same as a one file torrent). It also only uses the file browser on Mac OSX and Windows, but...

This change was never tested on Linux, which is using Qt's openURL and does actually open the file with the default application for the file type. It used to work (or not, I really never tested the before/after functionality) on Linux because the path was always a directory, opened by the file browser.

If you open a new ticket I will post a patch to disable going down one level in Linux. And I mean disable always, no distinction if it is a one-file torrent, or not. The alternative is to change the use of Qt's openURL to something that uses the file browser... perhaps something like (untested):

Code: Select all

QDesktopServices::openUrl(QUrl("file:///" + path));
basinilya
Posts: 11
Joined: Sat Dec 15, 2012 7:52 pm

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by basinilya »

I haven't forgotten you. For now, can we continue here without creating a ticket?
In this function: qt/mainwin.cc:

Code: Select all

void
TrMainWindow :: openFolder( )
{
    const int torrentId( *getSelectedTorrents().begin() );
    const Torrent * tor( myModel.getTorrentFromId( torrentId ) );
    const QString path( tor->getPath( ) );
    const FileList files = tor->files();
    if (files.size() == 1)
        openSelect( path + "/" + files.at(0).filename );
    else {
        QDir dir( path + "/" + files.at(0).filename );
        dir.cdUp();
        openSelect( dir.path() );
    }
}
there are more than one issue.
  • for the case "files.size() == 1", the file is opened, not the folder. But we already know that.
  • files.at(0) may contain a file in a sub-sub-folder of a torrent. Then cdUp() will set the wrong path.
  • "dir.cdUp();" works with existing directories only. If a user decides not to download a file in a torrent (clears checkbox), "cdUp()" fails
I think for the single file torrents we should change the last line in the function openSelect() :

Code: Select all

void openSelect(const QString& path)
{
...
#elif defined(Q_OS_UNIX)
    QDesktopServices :: openUrl( QUrl::fromLocalFile( path ) );
#endif
}
Actually, it would make no sense to first append the file name:

Code: Select all

path + "/" + files.at(0).filename
and then try to remove it inside openSelect().

For multifile torrents we shouldn't call openSelect(), because we don't need to highlight anything.
Instead:
  • extract the 1st path element from files.at(0)
  • append it to tor->getPath( )
  • call QDesktopServices::openUrl()
I have a question for you: does Torrent::files().at(0) contain backslashes on Windows? If not, then it will be easier to extract the first path element.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by rb07 »

You are over-thinking things.

What I proposed was to return the code for Linux to the way it was before, no checking if it is a one file torrent, or multi-file, or anything else it just opens the download directory.

I don't know if it can be improved since "Linux" is many possible desktops (KDE, Gnome, etc.); the selection of the torrent's directory or file may not be possible in a general case.

Without a ticket the developers are not going to change the code. So either re-open the existing ticket, or open a new one.
basinilya
Posts: 11
Joined: Sat Dec 15, 2012 7:52 pm

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by basinilya »

rb07 wrote:Without a ticket the developers are not going to change the code. So either re-open the existing ticket, or open a new one.
All right, I'll create a ticket.
does Torrent::files().at(0) contain backslashes on Windows?
Please answer
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by rb07 »

I don't see the point in your question, the code works fine in Windows, the path you are asking for is not even Windows specific, its the path contained in the torrent metadata (i.e. is the same path any operating system sees, therefore it doesn't have backslashes -- you are trying to modify a program you don't even understand, and for an operating system you're not going to test).
basinilya
Posts: 11
Joined: Sat Dec 15, 2012 7:52 pm

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by basinilya »

you are trying to modify a program you don't even understand
I'm not listening.
it doesn't have backslashes
Thanks. I'll
basinilya
Posts: 11
Joined: Sat Dec 15, 2012 7:52 pm

Re: QT, KDE: single file torrent, "open folder" opens the fi

Post by basinilya »

...change the code according to that and will attach my patches to the future tickets
Post Reply