mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Properly create "clean path" for watched folder
This commit is contained in:
committed by
Vladimir Golovnev
parent
ede42910da
commit
3ac8c97e6f
@@ -267,11 +267,10 @@ QString TorrentFilesWatcher::makeCleanPath(const QString &path)
|
||||
if (path.isEmpty())
|
||||
throw InvalidArgument(tr("Watched folder path cannot be empty."));
|
||||
|
||||
const QDir dir {path};
|
||||
if (dir.isRelative())
|
||||
if (QDir::isRelativePath(path))
|
||||
throw InvalidArgument(tr("Watched folder path cannot be relative."));
|
||||
|
||||
return dir.canonicalPath();
|
||||
return QDir::cleanPath(path);
|
||||
}
|
||||
|
||||
void TorrentFilesWatcher::load()
|
||||
|
||||
Reference in New Issue
Block a user