https://bugs.kde.org/show_bug.cgi?id=384500

            Bug ID: 384500
           Summary: kioexec: Spurious prompt to re-upload, when a
                    temporary file has been used
           Product: frameworks-kio
           Version: unspecified
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Simple test case:  use kioclient5 to open a remote file in an application that
uses %f or %F, not %u or %U, in its destop file:

$ kioclient5 exec 'smb://host/dir/test.kmz'

The file is opened in Marble as expected, which has Exec=marble %F in its
desktop file.  However, a dialogue also immediately appears saying "The file
has been modified, do you want to upload the changes?".

The debug log shows:

kdeinit5: Got EXEC_NEW '/usr/lib64/qt5/plugins/kf5/kio/smb.so' from launcher.
kdeinit5: preparing to launch '/usr/lib64/qt5/plugins/kf5/kio/smb.so'
smb.so(31291) SMBSlave::auth_initialize_smbc: auth_initialize_smbc 
smb.so(31291) SMBSlave::auth_initialize_smbc: smbc_init call
WARNING: Ignoring invalid value 'share' for parameter 'security'
smb.so(31291) SMBSlave::stat: QUrl("smb://host/dir/test.kmz")
smb.so(31291) SMBSlave::checkURL: checkURL  QUrl("smb://host/dir/test.kmz")
smb.so(31291) SMBSlave::checkURL: checkURL return3 
QUrl("smb://host/dir/test.kmz")
smb.so(31291) SMBUrl::updateCache: updateCache  "/dir/test.kmz"
smb.so(31291) SMBSlave::cache_stat: size  19570320
smb.so(31291) SMBUrl::updateCache: updateCache  "/dir/test.kmz"
smb.so(31291) SMBSlave::stat: QUrl("smb://host/dir/test.kmz")
smb.so(31291) SMBSlave::checkURL: checkURL  QUrl("smb://host/dir/test.kmz")
smb.so(31291) SMBSlave::checkURL: checkURL return3 
QUrl("smb://host/dir/test.kmz")
smb.so(31291) SMBUrl::updateCache: updateCache  "/dir/test.kmz"
smb.so(31291) SMBSlave::cache_stat: size  515
kdeinit5: Got EXT_EXEC '/usr/lib64/libexec/kf5/kioexec' from launcher.
kdeinit5: preparing to launch '/usr/lib64/libexec/kf5/kioexec'
kioexec(31295) KIOExec::KIOExec: command= "marble %F" args= ("marble %F",
"smb://host/dir/test.kmz")
kdeinit5: Got EXEC_NEW '/usr/lib64/qt5/plugins/kf5/kio/smb.so' from launcher.
kdeinit5: preparing to launch '/usr/lib64/qt5/plugins/kf5/kio/smb.so'
WARNING: Ignoring invalid value 'share' for parameter 'security'
smb.so(31299) SMBSlave::stat: QUrl("smb://host/dir/test.kmz")
smb.so(31299) SMBSlave::checkURL: checkURL  QUrl("smb://host/dir/test.kmz")
smb.so(31299) SMBSlave::checkURL: checkURL return3 
QUrl("smb://host/dir/test.kmz")
smb.so(31299) SMBUrl::updateCache: updateCache  "/dir/test.kmz"
smb.so(31299) SMBSlave::cache_stat: size  515
kioexec(31295) KIOExec::KIOExec: Copying QUrl("smb://host/dir/test.kmz")  to
QUrl("file:///home/jjm5/.cache/kioexec/krun/31295_0/test.kmz")

### The next line is a message that I've added, just before the
###     OrgKdeKIOExecdInterface kioexecd(QStringLiteral("org.kde.kioexecd"),
...
### line in KIOExec::KIOExec(const QStringList &args, bool tempFiles, const
QString &suggestedFileName)
kioexec(31295) KIOExec::KIOExec: Telling kioexecd to watch the file

### The next line is just after the
###     mUseDaemon = !kioexecd.lastError().isValid();
### a few lines below
kioexec(31295) KIOExec::KIOExec: use daemon? true

### This is where the file copy actually starts
smb.so(31299) SMBSlave::smbCopyGet: src =  QUrl("smb://host/dir/test.kmz") ,
dest =  QUrl("file:///home/jjm5/.cache/kioexec/krun/31295_0/test.kmz")

smb.so(31299) SMBUrl::updateCache: updateCache  "/dir/test.kmz"
smb.so(31299) SMBSlave::cache_stat: size  515
smb.so(31299) SMBSlave::smbCopyGet: modified: ""
kioexec(31295) KIOExec::slotResult: All files downloaded, will call slotRunApp
shortly
kioexec(31295) KIOExec::slotRunApp: EXEC  "/usr/bin/marble
/home/jjm5/.cache/kioexec/krun/31295_0/test.kmz"
marble(31302) Marble::MarblePart::readSettings: Start:
MarblePart::readSettings()

The significant parts are those marked with "###", showing that somehow the
watch is being installed before the ioslave has actually started to copy the
file.  The file does not exist at this time, so when the file is actually
copied the daemon receives a "dirty" signal for it, which puts up the dialogue.

This dialogue is coming from kiod5, not the fallback in kioclient5.  I have
verified this by using xprop and checking the WM_CLASS and _NET_WM_PID of the
dialogue.  I have also verified wih strace that, when kiod5 is first told to
watch the file, it does not yet exist:

23947 write(2, "kiod5(23947) KIOExecd::watch: Going to watch
\"/home/jjm5/.cache/kioexec/krun/31295_0/test.kmz\" for changes, remote
destination is \"smb://host/dir/test.kmz"..., 282) = 282
23947 stat("/home/jjm5/.cache/kioexec/krun/31295_0/test.kmz", 0x7ffdb7918980) =
-1 ENOENT (No such file or directory)
23947 statfs("/home/jjm5/.cache/kioexec/krun/31295_0/test.kmz", 0x7ffdb7918730)
= -1 ENOENT (No such file or directory)
23947 stat("/home/jjm5/.cache/kioexec/krun/31295_0", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to