forked from qt-creator/qt-creator
Don't try finalizing files that were never created.
Task-number: QTCREATORBUG-6643 Change-Id: I04945ebb39caace476a12f293666cfcec0f8a9e5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
c1f643e387
commit
6e6c9f9884
@@ -37,7 +37,7 @@
|
|||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
SaveFile::SaveFile(const QString &filename) :
|
SaveFile::SaveFile(const QString &filename) :
|
||||||
m_finalFileName(filename), m_finalized(false), m_backup(false)
|
m_finalFileName(filename), m_finalized(true), m_backup(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,6 +62,7 @@ bool SaveFile::open(OpenMode flags)
|
|||||||
if (!QTemporaryFile::open(flags))
|
if (!QTemporaryFile::open(flags))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
m_finalized = false; // needs clean up in the end
|
||||||
if (ofi.exists())
|
if (ofi.exists())
|
||||||
setPermissions(ofi.permissions()); // Ignore errors
|
setPermissions(ofi.permissions()); // Ignore errors
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user