Bug 464444

Summary: Saving of modified pdf fails when working on UNC path
Product: [Applications] okular Reporter: mark
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: major CC: mark
Priority: NOR    
Version First Reported In: 22.12.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Error message shown

Description mark 2023-01-18 11:36:45 UTC
Created attachment 155401 [details]
Error message shown

SUMMARY
Modified PDF files (e.g. after inserting a signature) cannot be saved when opened from an UNC path of a share (\\servername\sharename\exampl01\document1.pdf). An error message is shown (sorry for the translation, original language is German): "File kan not be saved in file 'file://servername/sharename/exampl01/document1.pdf'. Error 'Partfile //servername/sharename/exampl01/document01.pdf' cannot be renamed. Please check permissione. Try a different location." 
It will be saved without any error though when the same PDF file has been opened from the same share as a mapped drive  (K:\exampl01\document1.pdf).


STEPS TO REPRODUCE
1.  Open a PDF from an UNC path.
2. Add a note or signature to the document
3. Save document with CTRL+S

OBSERVED RESULT
Okular outputs error message, stating: "File kan not be saved in file 'file://servername/sharename/exampl01/document1.pdf'. Error 'Partfile //servername/sharename/exampl01/document01.pdf' cannot be renamed. Please check permissione. Try another location." 
A part-file containing the changes is created but renaming into the original file name fails.


EXPECTED RESULT
Okular save the PDF without error, just the way it does when the document is opened from within a mapped network share.


SOFTWARE/OS VERSIONS
Windows: 10 Pro