Page MenuHome GnuPG

Kleopatra: moving decrypted Folder to USB device fails
Testing, HighPublic


Decrypting a tar.gpg archive file with standard settings apparently works:

But after clicking "Save all", there is no further information shown to the user and no new Folder appears on the USB stick.

Debugview shows:

[8136] org.kde.pim.kleopatra: Moving "C:/Users/g10code.WIN-TEST3/AppData/Local/Temp/kleopatra-AtABCN/Program Files (x86)" to "F:/Program Files (x86)_1"
[8136] org.kde.pim.kleopatra: 
[8136] org.kde.pim.kleopatra: Error:  "<html><p>Die Datei ‘<tt>C:\\Users\\g10code.WIN-TEST3\\AppData\\Local\\Temp\\kleopatra-AtABCN\\Program Files (x86)</tt>’ kann nicht nach ‘<tt>F:\\Program Files (x86)_1</tt>’ verschoben werden.</p>\n\n<p><i>Zugriff verweigert auf F:/Program Files (x86)_1.</i></p></html>"

(Note: That is F:\ and not C:\)



Event Timeline

ebo triaged this task as High priority.Wed, May 17, 12:33 PM

Before you ask: I can write on that device and it works with gpgtar on the commandline:

gpgtar -v --status-fd 2 -C f: -d c:\Users\g10code.WIN-TEST3\Documents\testordner.tar.gpg
werner updated the task description. (Show Details)
aheinecke added a subscriber: aheinecke.

So the reason this fails is the same as it was back when T3547 was fixed. MoveFile does not work across directories, and even MoveFileEx that supports this for files does not support this for directories.

kio/src/ioslaves/file/file_win.cpp just does a plain MoveFile ( ) in their code sadly there is also no recursive copy in that code so I would need to extend that with the code from Kleopatra. Which Ingo wanted to remove because it had some issues. T6373

What I find confusing is that in kio/core/copyjob.cpp I get a debug line saying in startRenameJob:
" qCDebug(KIO_COPYJOB_DEBUG) << m_currentSrcURL << "->" << dest << "trying direct rename first";"

As if there would be a fallback if direct rename does not work. But I don't see it.

So the good news is that I know how to solve this issue by going back to the old code, but I would like to talk to ingo about how the old code could / should be improved first before.

ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Tue, May 30, 9:59 AM
ikloecker changed the task status from Open to Testing.Tue, May 30, 11:58 AM
ikloecker removed ikloecker as the assignee of this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
ikloecker added a subscriber: ikloecker.

Fixed as suggested by Andre. Additionally, I have added support for hidden files in the old code (which are probably not really a thing on Windows). The downside is that there is no progress on Windows (as before the switch to using KIO::move).