From 88e4dc87cb64f540f07874716c06a6f0e1637a15 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Tue, 6 Feb 2024 23:57:21 -0600 Subject: [PATCH] fs_acl.cpp --- src/fs_acl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fs_acl.cpp b/src/fs_acl.cpp index 1c4cf8ec..6b9fc40c 100644 --- a/src/fs_acl.cpp +++ b/src/fs_acl.cpp @@ -48,10 +48,11 @@ namespace fs int rv; int fd; - fd = fs::openat(fd_,relpath_.parent_path().string(),O_RDONLY); - + fd = fs::openat(fd_,relpath_.parent_path(),O_RDONLY); + if(fd < 0) + return false; - rv = fs::fgetxattr(fd_,relpath_.c_str(),POSIX_ACL_DEFAULT_XATTR,NULL,0); + rv = fs::fgetxattr(fd_,relpath_,POSIX_ACL_DEFAULT_XATTR,NULL,0); return (rv != -1); }