diff --git a/sources/full_format.cpp b/sources/full_format.cpp index abb0cd9..2fdbe2d 100644 --- a/sources/full_format.cpp +++ b/sources/full_format.cpp @@ -263,8 +263,10 @@ int FuseHighLevelOps::vchown(const char* path, return -ENOENT; } FileLockGuard fg(**opened); - (**opened).set_uid(uid); - (**opened).set_gid(gid); + if (uid != -1) + (**opened).set_uid(uid); + if (gid != -1) + (**opened).set_gid(gid); return 0; }; int FuseHighLevelOps::vsymlink(const char* to, const char* from, const fuse_context* ctx)