Use Canonical Paths for Relative Paths Calculations (#4211)

Fix redundant path elements
Closes #4173
This commit is contained in:
Tres Finocchiaro
2018-03-03 22:46:07 -05:00
committed by GitHub
parent 926b6542ae
commit 1d63bd3b4e
3 changed files with 7 additions and 3 deletions

View File

@@ -40,8 +40,11 @@ private slots:
QString absPath = fi.absoluteFilePath();
QString relPath = "drums/kick01.ogg";
QString fuzPath = absPath;
fuzPath.replace(relPath, "drums/.///kick01.ogg");
QCOMPARE(SampleBuffer::tryToMakeRelative(absPath), relPath);
QCOMPARE(SampleBuffer::tryToMakeAbsolute(relPath), absPath);
QCOMPARE(SampleBuffer::tryToMakeRelative(fuzPath), relPath);
}
} RelativePathTests;