diff --git a/src/base/path.cpp b/src/base/path.cpp index 51bea7694..0eef0fa20 100644 --- a/src/base/path.cpp +++ b/src/base/path.cpp @@ -142,7 +142,7 @@ Path Path::rootItem() const #ifdef Q_OS_WIN // should be `c:/` instead of `c:` - if (m_pathStr.at(slashIndex - 1) == u':') + if ((slashIndex == 2) && hasDriveLetter(m_pathStr)) return createUnchecked(m_pathStr.left(slashIndex + 1)); #endif return createUnchecked(m_pathStr.left(slashIndex));