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:
-rw-r--r--src/csync/csync_exclude.cpp10
-rw-r--r--test/csync/csync_tests/check_csync_exclude.cpp2
2 files changed, 8 insertions, 4 deletions
diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp
index 04ca68b16..37f898486 100644
--- a/src/csync/csync_exclude.cpp
+++ b/src/csync/csync_exclude.cpp
@@ -310,10 +310,12 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const QList<QByteArray> &exclud
#endif
/* We create a desktop.ini on Windows for the sidebar icon, make sure we don't sync them. */
- rc = csync_fnmatch("Desktop.ini", bname, 0);
- if (rc == 0) {
- match = CSYNC_FILE_SILENTLY_EXCLUDED;
- goto out;
+ if (blen == 11) {
+ rc = csync_fnmatch("Desktop.ini", bname, 0);
+ if (rc == 0) {
+ match = CSYNC_FILE_SILENTLY_EXCLUDED;
+ goto out;
+ }
}
if (!OCC::Utility::shouldUploadConflictFiles()) {
diff --git a/test/csync/csync_tests/check_csync_exclude.cpp b/test/csync/csync_tests/check_csync_exclude.cpp
index 8bcf95fdb..9329ca6de 100644
--- a/test/csync/csync_tests/check_csync_exclude.cpp
+++ b/test/csync/csync_tests/check_csync_exclude.cpp
@@ -258,6 +258,8 @@ static void check_csync_excluded_traversal(void **)
assert_int_equal(check_file_traversal(".sync_5bdd60bdfcfa.db-shm"), CSYNC_FILE_SILENTLY_EXCLUDED);
assert_int_equal(check_file_traversal("subdir/.sync_5bdd60bdfcfa.db"), CSYNC_FILE_SILENTLY_EXCLUDED);
+ /* Other builtin excludes */
+ assert_int_equal(check_file_traversal("foo/Desktop.ini"), CSYNC_FILE_SILENTLY_EXCLUDED);
/* pattern ]*.directory - ignore and remove */
assert_int_equal(check_file_traversal("my.~directory"), CSYNC_FILE_EXCLUDE_AND_REMOVE);