Bug 368314 - kwalletmanager: "Export as XML..." produces empty file
Summary: kwalletmanager: "Export as XML..." produces empty file
Status: RESOLVED FIXED
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:
: 371882 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-06 08:13 UTC by Bart
Modified: 2016-11-01 09:23 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.08.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bart 2016-09-06 08:13:25 UTC
Using "File -> Export as XML..." with kwalletmanager-16.08.0-1-x86_64 always results in an empty file being exported. A downgrade to kwalletmanager-16.04.3-1-x86_64 solves this issue. No valuable debug information on command line output. 

Reproducible: Always
Comment 1 Henri K 2016-10-17 08:38:09 UTC
I can reproduce with opensuse tumbleweed, kwalletmanager5-16.08.1-1.2.x86_64.
Comment 2 Freddy Rietdijk 2016-10-17 08:45:11 UTC
I can reproduce on NixOS Unstable. Frameworks 5.26.0, Apps 16.08.1, Qt 5.6.1
Comment 3 Elvis Angelaccio 2016-10-17 09:44:03 UTC
Confirmed. Adding Martin in CC, according to git blame the only commit that changed this code is e6f52caa71116b4a3b9c921748e977d43312621a (although I can't see what's wrong there).
Comment 4 Elvis Angelaccio 2016-10-28 15:29:42 UTC
Actually this seems to be a bug in KIO, see https://git.reviewboard.kde.org/r/129275/
Comment 5 Elvis Angelaccio 2016-10-30 11:10:35 UTC
Moving back, turns out the bug is in kwalletmanager indeed.
Comment 6 Elvis Angelaccio 2016-10-30 12:00:51 UTC
Git commit 956552dcb5beea41238a858cbe77570b21076b15 by Elvis Angelaccio.
Committed on 30/10/2016 at 12:00.
Pushed by elvisangelaccio into branch 'Applications/16.08'.

Fix XML export regression

StoredTransferJob reads data from the current position of the QIODevice
passed to it. Since a QTemporaryFile is always open in ReadWrite mode,
and we write to the file, the current position is the end of the file.

So we need to rewind the QIODevice's position before passing it to the job.
FIXED-IN: 16.08.3

M  +3    -0    src/manager/kwalleteditor.cpp

http://commits.kde.org/kwallet/956552dcb5beea41238a858cbe77570b21076b15
Comment 7 Elvis Angelaccio 2016-11-01 09:23:59 UTC
*** Bug 371882 has been marked as a duplicate of this bug. ***