r18229 by jghali - fix erroneous deletion of non temporary image file

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 5 19:50:40 UTC 2013


Author: jghali
Date: Fri Apr  5 19:50:38 2013
New Revision: 18229

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18229
Log:
fix erroneous deletion of non temporary image file

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18229&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Apr  5 19:50:38 2013
@@ -5796,7 +5796,8 @@
 		if ((ScCore->fileWatcher->files().contains(pageItem->Pfile) != 0) && (pageItem->PictureIsAvailable))
 		{
 			ScCore->fileWatcher->removeFile(pageItem->Pfile);
-			QFile::remove(pageItem->Pfile);
+			if (pageItem->isTempFile)
+				QFile::remove(pageItem->Pfile);
 			pageItem->Pfile = "";
 			pageItem->isInlineImage = false;
 			pageItem->isTempFile = false;




More information about the scribus-commit mailing list