Skip to content

Commit e880ee4

Browse files
committedMay 15, 2014
Fix writing relative file path if project path contains . or .. (pull request #1278)
1 parent b89cc25 commit e880ee4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/core/qgsproject.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,8 +1469,10 @@ QString QgsProject::writePath( QString src ) const
14691469
return src;
14701470
}
14711471

1472-
QString srcPath = src;
1473-
QString projPath = fileName();
1472+
QFileInfo srcFileInfo( src );//QString srcPath = src;
1473+
QFileInfo projFileInfo( fileName() );
1474+
QString srcPath = srcFileInfo.canonicalFilePath();
1475+
QString projPath = projFileInfo.canonicalFilePath();
14741476

14751477
if ( projPath.isEmpty() )
14761478
{

0 commit comments

Comments
 (0)
Please sign in to comment.