Bug 429895

Summary: PIM Data Exporter cannot import data in zip
Product: [Applications] pimsettingexporter Reporter: hchain <henri>
Component: generalAssignee: Laurent Montel <montel>
Status: RESOLVED FIXED    
Severity: major CC: zawertun
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.16.2
Sentry Crash Report:
Attachments: empty selection
zip contents

Description hchain 2020-12-01 14:33:16 UTC
Created attachment 133772 [details]
empty selection

SUMMARY
PIM Data Exporter cannot import its own exports.

STEPS TO REPRODUCE
1. export settings to zip
2. try to import zip

OBSERVED RESULT
no data is shown in the "Select Type" dialog

EXPECTED RESULT
settings that were exported should be visible and selectable

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.13
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
The zip file looks correct and contains many files which can also be seen in the "show archive information" window
Comment 1 hchain 2020-12-01 14:33:43 UTC
Created attachment 133773 [details]
zip contents
Comment 2 Yaroslav Sidlovsky 2021-01-05 21:20:21 UTC
Looks like I've got this bug too.
Can we provide some information to help debugging?
Comment 3 Yaroslav Sidlovsky 2021-01-05 21:25:54 UTC
If I run command "QT_LOGGING_RULES="org.kde.pim.pimdataexportercore=true" pimdataexporter", I see this while trying to import file:
"""
org.kde.pim.pimdataexportercore: Impossible to parse file
"""
Comment 4 Yaroslav Sidlovsky 2021-01-05 21:34:15 UTC
Just found the cause: pimdataexporter fails to parse XML-file `exportdatatype.xml` because it's empty (has 0 bytes size).
Comment 5 hchain 2021-01-05 21:36:47 UTC
same here
Comment 6 hchain 2021-01-05 22:04:43 UTC
deleting exportdatatype.xml from the zip fixes the issue
Comment 7 Yaroslav Sidlovsky 2021-01-05 22:11:03 UTC
Wow! Nice finding @hchain. It really helps 👍
Comment 8 Bug Janitor Service 2021-01-05 22:40:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/pim-data-exporter/-/merge_requests/4
Comment 9 Bug Janitor Service 2021-01-06 12:54:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/pim-data-exporter/-/merge_requests/5
Comment 10 Yaroslav Sidlovsky 2021-01-06 13:03:31 UTC
Git commit adf53dd4bdfdbf98b2b62061c586d4c078aa9c41 by Yaroslav Sidlovsky.
Committed on 06/01/2021 at 12:53.
Pushed by mlaurent into branch 'master'.

Don't copy empty exporteddata information file

M  +8    -4    core/pimdataimportdatainfofile.cpp

https://invent.kde.org/pim/pim-data-exporter/commit/adf53dd4bdfdbf98b2b62061c586d4c078aa9c41