Bug 371882 - Kwalletmanager doesn't export XML file
Summary: Kwalletmanager doesn't export XML file
Status: RESOLVED DUPLICATE of bug 368314
Alias: None
Product: kwalletmanager
Classification: Applications
Component: general (show other bugs)
Version: 16.08
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Valentin Rusu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-31 09:29 UTC by Michele Corazza
Modified: 2016-11-01 09:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Simple fix replacing temporary file with a QFile (1.42 KB, patch)
2016-10-31 09:29 UTC, Michele Corazza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Corazza 2016-10-31 09:29:02 UTC
Created attachment 101913 [details]
Simple fix replacing temporary file with a QFile

I am unable to export the wallet as cleartext XML. The file I select is created, but remains empty. The problem lies probably in the KWalletEditor::exportXML()
method, so I started fiddling with it. If I replace the whole temporary file mechanism with a simple output file, selected with the same QUrl mechanism as before, the file is correctly created. I checked and the temporary file contains the data, but it's never written to the selected file. I suspect there is some problem with KIO::storedput, but I never used the KDE libs nor am I a Qt expert so I'm not sure.
The attachment contains my naive fix for this bug, although I understand that this approach breaks some use cases (eg. saving the file to a remote resource).
Comment 1 Elvis Angelaccio 2016-10-31 14:13:31 UTC
Hi, thanks for the report. This is supposed to be fixed on git (will be in 16.08.3 release), see https://bugs.kde.org/show_bug.cgi?id=368314

How did you compile kwalletmanager? I see that your patch removes the actual bugfix (the tf.seek(0) line), so I wonder if the bugfix doesn't work for you or you tested a version of kwalletmanager without the bugfix.
Comment 2 Michele Corazza 2016-11-01 08:19:06 UTC
I must have erroneously tested the old version while I was compiling from git, because the problem seems now fixed for me in git master. Should I close the bug? I'm sorry I didn't find the old bug, probably since it was already closed.
Comment 3 Elvis Angelaccio 2016-11-01 09:23:59 UTC
No problem. Thanks for testing.

*** This bug has been marked as a duplicate of bug 368314 ***