Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trap000d/e5d9dfcc5c775a8579307534952121ab to your computer and use it in GitHub Desktop.
Save trap000d/e5d9dfcc5c775a8579307534952121ab to your computer and use it in GitHub Desktop.
Suppress invalid windows file names error in Seafile 8.0.3 client daemon
diff -ru seafile-8.0.3.original/daemon/repo-mgr.c seafile-8.0.3/daemon/repo-mgr.c
--- seafile-8.0.3.original/daemon/repo-mgr.c 2021-06-24 18:03:18.000000000 +1200
+++ seafile-8.0.3/daemon/repo-mgr.c 2021-07-01 19:23:57.291706307 +1200
@@ -1362,7 +1362,7 @@
}
#endif
-#ifndef WIN32
+#ifdef WIN32
base_name = g_path_get_basename(full_path);
if (check_path_ignore_on_windows (base_name)) {
send_file_sync_error_notification (repo_id, NULL, path,
@@ -1487,12 +1487,12 @@
return 0;
}
- base_name = g_path_get_basename(full_path);
- if (check_path_ignore_on_windows (base_name)) {
- send_file_sync_error_notification (params->repo_id, NULL, path,
- SYNC_ERROR_ID_INVALID_PATH_ON_WINDOWS);
- }
- g_free (base_name);
+// base_name = g_path_get_basename(full_path);
+// if (check_path_ignore_on_windows (base_name)) {
+// send_file_sync_error_notification (params->repo_id, NULL, path,
+// SYNC_ERROR_ID_INVALID_PATH_ON_WINDOWS);
+// }
+// g_free (base_name);
n = 0;
total = 0;
@@ -2321,7 +2321,7 @@
continue;
}
-#ifndef WIN32
+#ifdef WIN32
char *base_name = g_path_get_basename(full_path);
if (check_path_ignore_on_windows (base_name)) {
send_file_sync_error_notification (repo->id, repo->name, path,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment