/* possibly change the attribute */
if (newstats.dos.attrib != h->name->dos.attrib) {
mode_t mode = pvfs_fileperms(pvfs, newstats.dos.attrib);
- if (h->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) {
- /* ignore on directories for now */
- return NT_STATUS_OK;
- }
- if (fchmod(h->fd, mode) == -1) {
- return pvfs_map_errno(pvfs, errno);
+ if (!(h->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) {
+ if (fchmod(h->fd, mode) == -1) {
+ return pvfs_map_errno(pvfs, errno);
+ }
}
}
return NT_STATUS_FILE_IS_A_DIRECTORY;
}
- status = pvfs_xattr_unlink_hook(pvfs, name->full_name);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
+ if (name->st.st_nlink == 1) {
+ status = pvfs_xattr_unlink_hook(pvfs, name->full_name);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
}
/* finally try the actual unlink */