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:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-06-04 18:13:23 +0300
committerGitHub <noreply@github.com>2018-06-04 18:13:23 +0300
commitc1171d700e2bd5fc066cb76c2b7dc6a10ae089f3 (patch)
tree29fce31722cae86650fda8ada9b75be4f327b4fb
parent3a1dc44ec85b8db23688020b5b23f7635f98be13 (diff)
parent5f7fd7c5519d72f18ca7e6ce6fb5287c1e69aa2b (diff)
Merge pull request #322 from nextcloud/upstream/pr/6404
Excludes: Expand doc, Desktop.ini only in root folder
-rw-r--r--doc/architecture.rst11
-rw-r--r--src/csync/csync_exclude.cpp4
-rw-r--r--test/csync/csync_tests/check_csync_exclude.cpp3
3 files changed, 12 insertions, 6 deletions
diff --git a/doc/architecture.rst b/doc/architecture.rst
index de2fbf957..8b5aa9252 100644
--- a/doc/architecture.rst
+++ b/doc/architecture.rst
@@ -250,9 +250,14 @@ Some system wide file patterns that are used to exclude or ignore files are incl
By default, the Nextcloud Client ignores the following files:
-* Files matched by one of the patterns defined in the Ignored Files Editor
-* Files containing characters that do not work on certain file systems ``(`\, /, :, ?, *, ", >, <, |`)``.
-* Files starting with ``._sync_xxxxxxx.db`` and the old format ``.csync_journal.db``, as these files are reserved for journalling.
+* Files matched by one of the patterns defined in the Ignored Files Editor.
+* Files starting with ``._sync_*.db*``, ``.sync_*.db*``, ``.csync_journal.db*``, ``.owncloudsync.log*``, as these files are reserved for journalling.
+* Files with a name longer than 254 characters.
+* The file ``Desktop.ini`` in the root of a synced folder.
+* Files matching the pattern ``*_conflict-*`` unless conflict file uploading is enabled.
+* Windows only: Files containing characters that do not work on typical Windows filesystems ``(`\, /, :, ?, *, ", >, <, |`)``.
+* Windows only: Files with a trailing space or dot.
+* Windows only: Filenames that are reserved on Windows.
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
a line in the exclude file starts with the character ``]`` directly followed by
diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp
index c52b1ac91..e3146a099 100644
--- a/src/csync/csync_exclude.cpp
+++ b/src/csync/csync_exclude.cpp
@@ -217,8 +217,8 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const char *path, bool excludeC
}
#endif
- /* We create a desktop.ini on Windows for the sidebar icon, make sure we don't sync them. */
- if (blen == 11) {
+ /* We create a Desktop.ini on Windows for the sidebar icon, make sure we don't sync it. */
+ if (blen == 11 && path == bname) {
rc = csync_fnmatch("Desktop.ini", bname, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
diff --git a/test/csync/csync_tests/check_csync_exclude.cpp b/test/csync/csync_tests/check_csync_exclude.cpp
index f719aa4aa..95b6e9a31 100644
--- a/test/csync/csync_tests/check_csync_exclude.cpp
+++ b/test/csync/csync_tests/check_csync_exclude.cpp
@@ -271,7 +271,8 @@ static void check_csync_excluded_traversal(void **)
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);
+ assert_int_equal(check_file_traversal("foo/Desktop.ini"), CSYNC_NOT_EXCLUDED);
+ assert_int_equal(check_file_traversal("Desktop.ini"), CSYNC_FILE_SILENTLY_EXCLUDED);
/* pattern ]*.directory - ignore and remove */
assert_int_equal(check_file_traversal("my.~directory"), CSYNC_FILE_EXCLUDE_AND_REMOVE);