mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4555 Fix errors in filter behavior.
Handle double separators Handle */ pathfilter correctly (no recursive search)
This commit is contained in:
@@ -112,3 +112,19 @@ std::pair<QString, QString> RiaFilePathTools::toFolderAndFileName(const QString&
|
||||
return std::make_pair("", absFN);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaFilePathTools::removeDuplicatePathSeparators(const QString& path)
|
||||
{
|
||||
QString correctedPath = path;
|
||||
int len;
|
||||
do
|
||||
{
|
||||
len = correctedPath.size();
|
||||
correctedPath.replace(QString("%1%1").arg(SEPARATOR), SEPARATOR);
|
||||
} while (correctedPath.size() != len);
|
||||
|
||||
return correctedPath;
|
||||
}
|
||||
|
||||
@@ -40,4 +40,5 @@ public:
|
||||
static bool equalPaths(const QString& path1, const QString& path2);
|
||||
static QString canonicalPath(const QString& path);
|
||||
static std::pair<QString, QString> toFolderAndFileName(const QString& absFileName);
|
||||
static QString removeDuplicatePathSeparators(const QString& path);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user