[okular] [Bug 449976] New: Can't open okular document archive saved from a directory of images

2022-02-10 Thread dirtyice
https://bugs.kde.org/show_bug.cgi?id=449976

Bug ID: 449976
   Summary: Can't open okular document archive saved from a
directory of images
   Product: okular
   Version: 21.12.2
  Platform: Gentoo Packages
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: okular-devel@kde.org
  Reporter: kdeb...@dirty-ice.org
  Target Milestone: ---

SUMMARY
After okular's only useful feature was removed a couple of years ago, I finally
gathered my courage and tried to save the annotations I made, but okular can't
read its own format back.

STEPS TO REPRODUCE
1. Open a directory with a buch of jpg images, make some annotations
2. When exiting, it will ask to save the chages. Click on save.
3. It will conplain that it can't save in the curent format, click on Save as
Okular document archive
4. "After saving, the current document format requires the file to be reloaded.
Your undo/redo history will be lost.
Do you want to continue?" Click on yes.

OBSERVED RESULT
Okular quits. In the console I see

kf.kio.slaves.file: copy() QUrl("file:///tmp/okular.CSKYyV") to
QUrl("file:///home/dirty_ice/test") mode= -1
kf.kio.slaves.file: the file doesn't have any xattr
org.kde.okular.core: No plugin for mimetype '"application/zip"'.
The document hasn't been reloaded/swapped correctly

Trying to open the file manually, it says "Can not find a plugin which is able
to handle the document being passed." Okay, it didn't include the .okular
extension automatically, fix it and try again:
"Could not open file:///home/dirty_ice/test.okular."
And that's all.
The only way I managed to get my annotations back was to open the metadata.xml
inside the .okular file, and copy the  to
~/.local/share/okular/docdata/.xml, in this case when I open
the dir my annotations are back, along with a message that this is deprecated
and save to a file if I want to edit the document. Except the Save as button is
disabled (both on the message and in the file menu), and it's read only, so I
can't create new annotations or modify existing ones either.

EXPECTED RESULT
It should open the .okular file, hopefully without packing the hundreds of
megabytes of images into it.

SOFTWARE/OS VERSIONS
Windows: nope
macOS: no way
Linux/KDE Plasma: Gentoo linux ~amd64
(available in About System)
KDE Plasma Version: not installed (I'm using awesome as a WM)
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 449976] Can't open okular document archive saved from a directory of images

2022-02-10 Thread dirtyice
https://bugs.kde.org/show_bug.cgi?id=449976

dirtyice  changed:

   What|Removed |Added

 CC||kdeb...@dirty-ice.org

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 449976] Can't open okular document archive saved from a directory of images

2022-02-10 Thread dirtyice
https://bugs.kde.org/show_bug.cgi?id=449976

--- Comment #2 from dirtyice  ---
(In reply to Albert Astals Cid from comment #1)
> I mean, you asked it to do that, so I'm not sure why you're suddently
> surprised that the application did what you said.

Hmm, what do you mean? We have two things going on.
First I wanted to quit, and save the changes before I quit. Not necessarily a
bug, it's just a bit weird that okular asks to reload the document, when it's
going to quit right after it.
But my main problem is that I can't load the document it saved at all. I didn't
ask okular to create an unopenable file.

> Anyhow, you defenitely triggered an unexpected path, sadly folders of images
> is not something the code accounts for, my suggestion is that one shouldn't
> be able to annotate when opening folders of images, just when opening
> individual files.
Couldn't it be made to work somehow? I mean, back when okular automatically
saved annotations in a separate file into ~/.local/share/okular/docdata, this
worked IIRC.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 449976] Can't open okular document archive saved from a directory of images

2022-02-10 Thread dirtyice
https://bugs.kde.org/show_bug.cgi?id=449976

--- Comment #3 from dirtyice  ---
Oh yes, sorry, now that I re-read my original bugreport, I noticed that the
wall of text is under observed result and the expected result comes logically
after steps to reproduce, it's only physically after observed result, but
that's not what I exactly had on mind when written the report.
So TL;DR, my problem is that it can't load the file it created, everything else
is additional information.

-- 
You are receiving this mail because:
You are the assignee for the bug.