Skip to content

Commit 9dfdd7b

Browse files
author
VioletGiraffe
committed
Update filesystemhelperfunctions.h
Minor fix in longestCommonRootPath
1 parent c58b4a6 commit 9dfdd7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

file-commander-core/src/filesystemhelperfunctions.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ inline QString longestCommonRootPath(const QString& pathA, const QString& pathB)
139139
for (auto it = hierarchyA.cbegin(); it != mismatch.first; ++it)
140140
{
141141
result += *it;
142-
result += '/';
142+
if (*it != '/')
143+
result += '/';
144+
else
145+
assert_debug_only(it->endsWith('/'));
143146
}
144147

145148
return result;

0 commit comments

Comments
 (0)