Skip to content
Permalink
Browse files

[FEATURE] leave backup when saving projects

  • Loading branch information
jef-n committed Nov 12, 2013
1 parent ee3870e commit a4cfbb19609a18a87c84301bb718f20db2b54186
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/core/qgsproject.cpp
@@ -936,6 +936,15 @@ bool QgsProject::write()
{
clearError();

// Create backup file
if ( QFile::exists( fileName() ) )
{
QString backup = fileName() + "~";
if ( QFile::exists( backup ) )
QFile::remove( backup );
QFile::rename( fileName(), backup );
}

// if we have problems creating or otherwise writing to the project file,
// let's find out up front before we go through all the hand-waving
// necessary to create all the Dom objects

0 comments on commit a4cfbb1

Please sign in to comment.
You can’t perform that action at this time.