mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix wrong parent path
This commit is contained in:
parent
16482c507b
commit
d7d1a90de6
1 changed files with 2 additions and 2 deletions
|
@ -162,8 +162,8 @@ Path Path::parentPath() const
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// should be `c:/` instead of `c:`
|
// should be `c:/` instead of `c:`
|
||||||
// Windows "drive letter" is limited to one alphabet
|
// Windows "drive letter" is limited to one alphabet
|
||||||
if ((slashIndex == 2) && (m_pathStr.at(1) == u':'))
|
if ((slashIndex == 2) && hasDriveLetter(m_pathStr))
|
||||||
return createUnchecked(m_pathStr.left(slashIndex + 1));
|
return (m_pathStr.size() == 3) ? Path() : createUnchecked(m_pathStr.left(slashIndex + 1));
|
||||||
#endif
|
#endif
|
||||||
return createUnchecked(m_pathStr.left(slashIndex));
|
return createUnchecked(m_pathStr.left(slashIndex));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue