Fix directory name comparison

This commit is contained in:
alqualos 2012-01-14 10:48:18 +00:00
parent 7353648c53
commit 8d9621dc48

View file

@ -213,14 +213,14 @@ void TestJlCompress::extractDir()
foreach (QString fileName, fileNames) {
QString fullName = "jlext/jldir/" + fileName;
QFileInfo fileInfo(fullName);
if (!fullName.endsWith('/'))
if (!fileInfo.isDir())
QCOMPARE(fileInfo.size(), QFileInfo("tmp/" + fileName).size());
curDir.remove(fullName);
curDir.rmpath(fileInfo.dir().path());
if (fullName.endsWith('/'))
QVERIFY(extracted.contains(fileInfo.absoluteFilePath() + '/'));
else
QVERIFY(extracted.contains(fileInfo.absoluteFilePath()));
QString absolutePath = fileInfo.absoluteFilePath();
if (fileInfo.isDir() && !absolutePath.endsWith('/'))
absolutePath += '/';
QVERIFY(extracted.contains(absolutePath));
}
curDir.rmpath("jlext/jldir");
removeTestFiles(fileNames);