Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2016-09-12 16:02:54 +0300
committerOlivier Goffart <ogoffart@woboq.com>2016-09-12 17:05:55 +0300
commit904cd46f757bf329b719bd815394ff986be99aaf (patch)
treebd736a12677f6ad7db7da9c88cba4a6d077fa00e /src/gui/folderwatcher.cpp
parent2d110540ee5a67d2c014fcf4258840d3aaf538ac (diff)
Revert "FolderWatcher: Act on relative paths #5116 (#5153)"
This is not sufficient as it is not working for the Socket API. Next commit will fix it in another layer. Also, not ignoring paths that are not inside the folder is wrong as it might still happen if the name has a different casing This reverts commit d5a481f13240b50ff3993184152d3d4145ebfde0.
Diffstat (limited to 'src/gui/folderwatcher.cpp')
-rw-r--r--src/gui/folderwatcher.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp
index c115611bb..30809c82f 100644
--- a/src/gui/folderwatcher.cpp
+++ b/src/gui/folderwatcher.cpp
@@ -41,9 +41,7 @@ FolderWatcher::FolderWatcher(const QString &root, Folder* folder)
: QObject(folder),
_folder(folder)
{
- _canonicalFolderPath = QFileInfo(root).canonicalFilePath();
-
- _d.reset(new FolderWatcherPrivate(this, _canonicalFolderPath));
+ _d.reset(new FolderWatcherPrivate(this, root));
_timer.start();
}
@@ -57,17 +55,10 @@ bool FolderWatcher::pathIsIgnored( const QString& path )
if( !_folder ) return false;
#ifndef OWNCLOUD_TEST
- QString relPath = path;
- if (relPath.startsWith(_canonicalFolderPath)) {
- relPath = relPath.remove(0, _canonicalFolderPath.length()+1);
- if (_folder->isFileExcludedRelative(relPath)) {
- qDebug() << "* Ignoring file" << relPath << "in" << _canonicalFolderPath;
- return true;
- }
+ if (_folder->isFileExcludedAbsolute(path)) {
+ qDebug() << "* Ignoring file" << path;
+ return true;
}
- // there could be an odd watch event not being inside the _canonicalFolderPath
- // We will just not ignore it then, who knows.
-
#endif
return false;
}