Properly create "clean path" for watched folder (#15179)

This commit is contained in:
Vladimir Golovnev
2021-07-12 11:44:52 +03:00
committed by GitHub
parent abd6eb2ff3
commit 699b91ab8d
2 changed files with 9 additions and 12 deletions

View File

@@ -268,11 +268,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()