diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-08-27 20:15:47 +0300 |
---|---|---|
committer | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-08-27 20:15:47 +0300 |
commit | a8a05ec18ae5487eeb94f3e4923e80722171c88b (patch) | |
tree | ba794ef87490c9b2757bacb82458afe0ce966ac1 /src/gui/folderman.cpp | |
parent | aaf4a708ccc5663dd4b12e62412df10c7ce98495 (diff) |
Small cleanup
Diffstat (limited to 'src/gui/folderman.cpp')
-rw-r--r-- | src/gui/folderman.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index 9dc8c9385..9bdc5725a 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -1329,14 +1329,16 @@ static QString checkPathValidityRecursive(const QString &path) Utility::NtfsPermissionLookupRAII ntfs_perm; #endif const QFileInfo selFile(path); - if (!QDir(path).entryList({ QStringLiteral(".sync_*.db"), QStringLiteral("._sync_*.db") }, QDir::Hidden | QDir::Files).isEmpty()) { + + if (!selFile.absoluteDir().entryList({ QStringLiteral(".sync_*.db"), QStringLiteral("._sync_*.db") }, QDir::Hidden | QDir::Files).isEmpty()) { return FolderMan::tr("The folder %1 is used in a folder sync connection!").arg(QDir::toNativeSeparators(selFile.filePath())); } if (!selFile.exists()) { const QString parentPath = selFile.path(); - if (parentPath != path) + if (parentPath != path) { return checkPathValidityRecursive(parentPath); + } return FolderMan::tr("The selected path does not exist!"); } |