Fix a bug in commonRootPath logic

This commit is contained in:
Bjørn Erik Jensen 2018-04-17 10:59:47 +02:00
parent c0704a65f3
commit a8fb4469b4

View File

@ -110,7 +110,7 @@ QString RiaFilePathTools::commonRootPath(const QStringList& paths)
{
if (i > 0 && (root[i-1] == '/' || root[i-1] == '\\')) iDir = i;
if (root[i] != item[i])
if (root[i] != item[i] || i == root.length() - 1)
{
root.truncate(std::min(i, iDir));
break;