Summary: | Moving files on sftp which overwrites other files does not work | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Ralf Jung <post> |
Component: | sftp | Assignee: | Andreas Schneider <asn> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adawit |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.6.4 | |
Sentry Crash Report: | |||
Attachments: | kiosftp log |
Description
Ralf Jung
2010-10-26 11:09:50 UTC
I just updated to KDE 4.6, and this issue is unfortunately still around. Which version of 4.6? 4.6.2 from the Kubuntu backports PPA. I have to test this, but I think this is a KIO issue. It should download the file and upload it again. This doesn't happen. Could you provide log files please. http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves/Debugging_kio_sftp Actually I do not think it should download and re-upload the file - for example, on ftp, I can move a file that is several 100 MiB or even bigger in size without any delay. A re-upload would take a loooong time. I should also mention that copying a file that overwrites another works fine (i.e., replace "Ctrl+X by "Ctrl+C" in he steps above). Just moving is a problem. I enabled the logging and got a rather large file containing a whole lot of folder names of the university server and whatnot - I don't want to upload it all here, but I think I found the right part and attached it. If this is not enough, I can email you a more complete logfile. Created attachment 59483 [details]
kiosftp log
SFTP doesn't support server side copying of files. So you can only download and then upload it to the new location. However, looking at the log file. The file is correctly renamed/moved to its new location but then KIO tries to delete the old file and fails cause the file doesn't exist anymore. Dawit, this looks like a KIO issue and not sftp related but I'm not 100% sure. Could you please comment? (In reply to comment #8) > Dawit, this looks like a KIO issue and not sftp related but I'm not 100% sure. > Could you please comment? Yeah to me this seems to be a KIO::CopyJob issue. Specifically, when you choose to move a file, whether through Cut+Paste or Drag&Drop+Move, if the file you are moving already exists in the destination and you choose to overwrite it, KIO::CopyJob does not send a rename command with the overwrite flag set to true. Instead it attempts to do something I do not quite comprhend ; so this is a question for David to answer. CC'ing him. (In reply to comment #9) > (In reply to comment #8) > > Dawit, this looks like a KIO issue and not sftp related but I'm not 100% sure. > > Could you please comment? > > Yeah to me this seems to be a KIO::CopyJob issue. Specifically, when you choose > to move a file, whether through Cut+Paste or Drag&Drop+Move, if the file you > are moving already exists in the destination and you choose to overwrite it, > KIO::CopyJob does not send a rename command with the overwrite flag set to > true. Instead it attempts to do something I do not quite comprhend ; so this is > a question for David to answer. CC'ing him. Actually I take it back. KIO::CopyJob does do the right thing and sends a second rename command with the overwrite flag set to true. Actually, it is kio_sftp's rename function calling its "del" function to remove the desintation that is causing this problem ; so this is a kio_sftp bug. Removing David from the CC list. Git commit 39b75552f89e6eef6e6ad6c637dc4663d58facd9 by Dawit Alemayehu. Committed on 03/05/2011 at 20:01. Pushed by adawit into branch 'KDE/4.6'. Don't call del when asked to overwrite a destination file in rename. Otherwise, the finished signal from calling del will cause the bug reported in 255296. BUG: 255296 FIXED-IN: 4.6.4 M +13 -2 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/39b75552f89e6eef6e6ad6c637dc4663d58facd9 Git commit b7e73614d258b37eeb4ebf2758fb96bb2f8b2526 by Dawit Alemayehu. Committed on 03/05/2011 at 20:01. Pushed by adawit into branch 'master'. Don't call del when asked to overwrite a destination file in rename. Otherwise, the finished signal from calling del will cause the bug reported in 255296. CCBUG: 255296 (cherry picked from commit 39b75552f89e6eef6e6ad6c637dc4663d58facd9) M +13 -2 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/b7e73614d258b37eeb4ebf2758fb96bb2f8b2526 |