Skip to content

Commit

Permalink
Fix writing relative file path if project path contains . or .. (pull…
Browse files Browse the repository at this point in the history
… request #1278)
  • Loading branch information
mhugent committed May 15, 2014
1 parent b89cc25 commit e880ee4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgsproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,10 @@ QString QgsProject::writePath( QString src ) const
return src;
}

QString srcPath = src;
QString projPath = fileName();
QFileInfo srcFileInfo( src );//QString srcPath = src;
QFileInfo projFileInfo( fileName() );
QString srcPath = srcFileInfo.canonicalFilePath();
QString projPath = projFileInfo.canonicalFilePath();

if ( projPath.isEmpty() )
{
Expand Down

0 comments on commit e880ee4

Please sign in to comment.