mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Don't leave an empty folder when deleting or moving torrents
Currently when you delete or move a torrent sometimes an empty folder will stay. This is because hidden files will stay which didn't got deleted. The reason that it is not working is that QDir::Files is used which doesn't lists hidden files. Adding QDir::Hidden will make the code work as expected. At least on Windows and macOS QDir::Files doesn't lists hidden files. I can't test on linux. PR #22983.
This commit is contained in:
parent
7aebd07f9f
commit
ec9d541bbd
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ bool Utils::Fs::smartRemoveEmptyFolderTree(const Path &path)
|
|||
if (!dir.isEmpty(QDir::Dirs | QDir::NoDotAndDotDot))
|
||||
continue;
|
||||
|
||||
const QStringList tmpFileList = dir.entryList(QDir::Files);
|
||||
const QStringList tmpFileList = dir.entryList(QDir::Files | QDir::Hidden);
|
||||
|
||||
// deleteFilesList contains unwanted files, usually created by the OS
|
||||
// temp files on linux usually end with '~', e.g. `filename~`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue