[Pkg-owncloud-commits] [owncloud-client] 84/219: Win32: ignore files ending in '.' or at least one space
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 2dfbc2058fe172eb8abc96b71da33031fdc5adc1
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Wed Sep 10 15:21:19 2014 +0200
Win32: ignore files ending in '.' or at least one space
Fixes #416
Fixes #2176
---
csync/src/csync_exclude.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c
index 8567575..583aabe 100644
--- a/csync/src/csync_exclude.c
+++ b/csync/src/csync_exclude.c
@@ -199,6 +199,20 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
goto out;
}
+#ifdef _WIN32
+ // Windows cannot sync files ending in spaces (#2176). It also cannot
+ // distinguish files ending in '.' from files without an ending,
+ // as '.' is a separator that is not stored internally, so let's
+ // not allow to sync those to avoid file loss/ambiguities (#416)
+ size_t blen = strlen(bname);
+ if (blen > 1 && (bname[blen-1]== ' ' || bname[blen-1]== '.' )) {
+ match = CSYNC_FILE_EXCLUDE_INVALID_CHAR;
+ SAFE_FREE(bname);
+ SAFE_FREE(dname);
+ goto out;
+ }
+#endif
+
rc = csync_fnmatch(".owncloudsync.log*", bname, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list