don't add trailing / for root paths
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 12 Nov 2021 03:26:41 +0000 (14:26 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 12 Nov 2021 03:26:41 +0000 (14:26 +1100)
fuse_xattrs.c

index 94126dc3fe0158e4c1f0885c256740d1f7afc3da..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 {