From b0131edac01695a533c4ffd33774215aec9cd03a Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 25 Feb 2018 22:11:10 -0500 Subject: [PATCH] Fix an old comment about dirname/basename handling in apply_default_acl(). --- src/apply-default-acl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apply-default-acl.c b/src/apply-default-acl.c index 0a70b09..b7ef3a8 100644 --- a/src/apply-default-acl.c +++ b/src/apply-default-acl.c @@ -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) { -- 2.43.2