]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
Fix an old comment about dirname/basename handling in apply_default_acl().
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 26 Feb 2018 03:11:10 +0000 (22:11 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 26 Feb 2018 19:10:29 +0000 (14:10 -0500)
src/apply-default-acl.c

index 0a70b09d27dc7c88355e9cc339016b1f33357647..b7ef3a82c951f83e167c9dd00653402f7b74ef95 100644 (file)
@@ -536,9 +536,8 @@ int apply_default_acl(const char* path,
   /* The file descriptor corresponding to "path" */
   int fd = 0;
 
-  /* Split "path" into base/dirname parts to be used with openat().
-   * We duplicate the strings involved because dirname/basename mangle
-   * their arguments.
+  /* Get the parent directory of "path" with dirname(), which happens
+   * to murder its argument and necessitates a path_copy.
    */
   char* path_copy = strdup(path);
   if (path_copy == NULL) {