ensure paret directories for sidecars
[rrq/fuse_xattrs.git] / fuse_xattrs.c
index 3539c652bce620b7ca52059051bd956f8872e58d..335f1c29069f878078278335370112ad8b7c9cbd 100644 (file)
@@ -206,8 +206,8 @@ const char *sanitized_source_directory(const char *path) {
        return NULL; // Path badness
     }
 
-    // Append "/" and allocate new memory for the string
-    return strdup( strcat( absolute_path, "/" ) );
+    // Allocate new memory for the string
+    return strdup( absolute_path );
 }
 
 enum {
@@ -244,16 +244,17 @@ static int xattrs_opt_proc(void *data, const char *arg, int key,
         case KEY_HELP:
             fprintf(stderr,
                     "usage: %s source_dir mountpoint [options]\n"
-                            "\n"
-                            "general options:\n"
-                            "    -o opt,[opt...]  mount options\n"
-                            "    -h   --help      print help\n"
-                            "    -V   --version   print version\n"
-                            "\n"
-                            "FUSE XATTRS options:\n"
-                            "    -o show_sidecar  don't hide sidecar files\n"
-                            "    -o enable_namespaces  enable namespaces checks\n"
-                            "\n", outargs->argv[0]);
+                   "\n"
+                   "general options:\n"
+                   "    -o opt,[opt...]  mount options\n"
+                   "    -h   --help      print help\n"
+                   "    -V   --version   print version\n"
+                   "\n"
+                   "FUSE XATTRS options:\n"
+                   "    -o show_sidecar  don't hide sidecar files\n"
+                   "    -o enable_namespaces  enable namespaces checks\n"
+                   "    -o sroot=path  use other sidecar root path\n"
+                   "\n", outargs->argv[0]);
 
             fuse_opt_add_arg(outargs, "-ho");
             fuse_main(outargs->argc, outargs->argv, &xmp_oper, NULL);