mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 03:28:41 -07:00
Fix folder name extraction functions
It should return empty string if there is no parent folder.
This commit is contained in:
parent
70b242f190
commit
79048812e9
2 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ QString Utils::Fs::folderName(const QString &filePath)
|
|||
const QString path = toUniformPath(filePath);
|
||||
const int slashIndex = path.lastIndexOf('/');
|
||||
if (slashIndex == -1)
|
||||
return path;
|
||||
return {};
|
||||
return path.left(slashIndex);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue