Hardcode Desktop.ini in the exclude list
authorJocelyn Turcotte <jturcotte@woboq.com>
Mon, 14 Aug 2017 09:42:30 +0000 (11:42 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Tue, 15 Aug 2017 11:37:33 +0000 (13:37 +0200)
This prevents it from being removed from the exclude list, which
would be an issue since the client itself creates this file in a way
that wouldn't match on machines with different installation paths.

csync/src/csync_exclude.c
sync-exclude.lst

index 873a12d885de37abfbbf026a95ad08409b7715b7..fea662504421297e501eb3486c4ad302e1bf82d5 100644 (file)
@@ -293,6 +293,13 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch
     }
 #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;
+    }
+
     rc = csync_fnmatch(".owncloudsync.log*", bname, 0);
     if (rc == 0) {
         match = CSYNC_FILE_SILENTLY_EXCLUDED;
index 9d58aa9fbd94942afa4379eddda43d6b1c154899..bdf6c34415553b4c1153d23e8aa84abf42febc47 100644 (file)
@@ -8,7 +8,6 @@
 ].ds_store
 ._*
 ]Thumbs.db
-desktop.ini
 System Volume Information
 
 .*.sw?