mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
Fix hidden file handling #4655
There were two issues: * With the refactoring of how Folder and SyncEngine relate, the ignore_hidden_files flag on the CSync context was reset after each sync run and not updated from the configuration again. * The folder watcher failed to enumerate hidden folders and thus didn't watch for changes inside them. (linux only)
This commit is contained in:
parent
68b7437afb
commit
6f454feb39
3 changed files with 3 additions and 2 deletions
|
@ -548,7 +548,6 @@ int csync_commit(CSYNC *ctx) {
|
|||
ctx->remote.read_from_db = 0;
|
||||
ctx->read_remote_from_db = true;
|
||||
ctx->db_is_empty = false;
|
||||
ctx->ignore_hidden_files = true; // do NOT sync hidden files by default.
|
||||
|
||||
|
||||
/* Create new trees */
|
||||
|
|
|
@ -753,6 +753,8 @@ void Folder::startSync(const QStringList &pathList)
|
|||
quint64 limit = newFolderLimit.first ? newFolderLimit.second * 1000 * 1000 : -1; // convert from MB to B
|
||||
_engine->setNewBigFolderSizeLimit(limit);
|
||||
|
||||
_engine->setIgnoreHiddenFiles(_definition.ignoreHiddenFiles);
|
||||
|
||||
QMetaObject::invokeMethod(_engine.data(), "startSync", Qt::QueuedConnection);
|
||||
|
||||
// disable events until syncing is done
|
||||
|
|
|
@ -58,7 +58,7 @@ bool FolderWatcherPrivate::findFoldersBelow( const QDir& dir, QStringList& fullL
|
|||
} else {
|
||||
QStringList nameFilter;
|
||||
nameFilter << QLatin1String("*");
|
||||
QDir::Filters filter = QDir::Dirs | QDir::NoDotAndDotDot|QDir::NoSymLinks;
|
||||
QDir::Filters filter = QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::Hidden;
|
||||
const QStringList pathes = dir.entryList(nameFilter, filter);
|
||||
|
||||
QStringList::const_iterator constIterator;
|
||||
|
|
Loading…
Reference in a new issue