diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2021-08-26 17:24:39 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-08-27 20:14:11 +0300 |
commit | aaf4a708ccc5663dd4b12e62412df10c7ce98495 (patch) | |
tree | 408a0d20b460d8ec40435905d32d37f4f10592c2 /src/gui/folderman.cpp | |
parent | c4d91188f9b1d9fd8f10b4775f5a73e17082ed69 (diff) |
Check the correct path for .sync_*.db and ._sync_*.db
The dir() method will return the *parent* directory of the
file/directory in the QFileInfo. So if "~/ownCloud" was passed in as the
path, the check for .sync_*.db would be done on "~/".
Because we're migrating from ._sync_*.db to .sync_*.db, it will now also
check for the old filename.
Fixes: #8849
Diffstat (limited to 'src/gui/folderman.cpp')
-rw-r--r-- | src/gui/folderman.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index d591d2f25..9dc8c9385 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -1329,7 +1329,7 @@ static QString checkPathValidityRecursive(const QString &path) Utility::NtfsPermissionLookupRAII ntfs_perm; #endif const QFileInfo selFile(path); - if (!selFile.dir().entryList({ QStringLiteral(".sync_*.db") }, QDir::Hidden | QDir::Files).isEmpty()) { + if (!QDir(path).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())); } |