mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 13:11:41 +00:00
when archiving, resolve the symlink if the document path is that
CCBUG: 245243 svn path=/trunk/KDE/kdegraphics/okular/; revision=1161859
This commit is contained in:
parent
72e53fd4f0
commit
ba0dd22f71
|
@ -3370,6 +3370,11 @@ bool Document::saveDocumentArchive( const QString &fileName )
|
|||
if ( docFileName == QLatin1String( "-" ) )
|
||||
return false;
|
||||
|
||||
QString docPath = d->m_docFileName;
|
||||
const QFileInfo fi( docPath );
|
||||
if ( fi.isSymLink() )
|
||||
docPath = fi.symLinkTarget();
|
||||
|
||||
KZip okularArchive( fileName );
|
||||
if ( !okularArchive.open( QIODevice::WriteOnly ) )
|
||||
return false;
|
||||
|
@ -3407,7 +3412,7 @@ bool Document::saveDocumentArchive( const QString &fileName )
|
|||
okularArchive.writeFile( "content.xml", user.loginName(), userGroup.name(),
|
||||
contentDocXml.constData(), contentDocXml.length() );
|
||||
|
||||
okularArchive.addLocalFile( d->m_docFileName, docFileName );
|
||||
okularArchive.addLocalFile( docPath, docFileName );
|
||||
okularArchive.addLocalFile( metadataFile.fileName(), "metadata.xml" );
|
||||
|
||||
if ( !okularArchive.close() )
|
||||
|
|
Loading…
Reference in a new issue