mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2555 Add canonicalPath method to improve path handling
This commit is contained in:
@@ -86,3 +86,11 @@ bool RiaFilePathTools::equalPaths(const QString& path1, const QString& path2)
|
||||
appendSeparatorIfNo(p2);
|
||||
return p1 == p2;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Own canonicalPath method since the QDir::canonicalPath seems to not work
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaFilePathTools::canonicalPath(const QString& path)
|
||||
{
|
||||
return QDir(path).absolutePath();
|
||||
}
|
||||
|
||||
@@ -36,4 +36,5 @@ public:
|
||||
static QString& appendSeparatorIfNo(QString& path);
|
||||
static QString relativePath(const QString& rootDir, const QString& dir);
|
||||
static bool equalPaths(const QString& path1, const QString& path2);
|
||||
static QString canonicalPath(const QString& path);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user