Win32: More reserved file names to ignore, including Recycle Bin
authorDaniel Molkentin <danimo@owncloud.com>
Thu, 12 Mar 2015 15:25:32 +0000 (16:25 +0100)
committerDaniel Molkentin <danimo@owncloud.com>
Thu, 12 Mar 2015 15:25:32 +0000 (16:25 +0100)
Addresses #2955

csync/src/csync_exclude.c

index 198389ac728ef054288414c70cb631a171a11086..f17e0974466b889eaae1c2fadac6a559ec7a7f04 100644 (file)
@@ -151,11 +151,12 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
     return match;
 }
 
-// See http://support.microsoft.com/kb/74496
-static const char *win_reserved_words[] = {"CON","PRN","AUX", "NUL",
-                                           "COM1", "COM2", "COM3", "COM4",
-                                           "LPT1", "LPT2", "LPT3", "CLOCK$" };
-
+// See http://support.microsoft.com/kb/74496 and
+// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
+// Additionally, we ignore '$Recycle.Bin', see https://github.com/owncloud/client/issues/2955
+static const char* win_reserved_words[] = {"CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5",
+                                           "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4",
+                                           "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "CLOCK$", "$Recycle.Bin" };
 
 bool csync_is_windows_reserved_word(const char* filename) {