mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r14947: add support for file truncate events
(This used to be commit ed1b90407d
)
This commit is contained in:
parent
8be91f2d0f
commit
2b0537143c
@ -400,7 +400,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
|
||||
if (ret == -1) {
|
||||
return pvfs_map_errno(pvfs, errno);
|
||||
}
|
||||
change_mask |= FILE_NOTIFY_CHANGE_SIZE;
|
||||
change_mask |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES;
|
||||
}
|
||||
}
|
||||
|
||||
@ -580,6 +580,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
|
||||
} else if (truncate(name->full_name, newstats.st.st_size) == -1) {
|
||||
return pvfs_map_errno(pvfs, errno);
|
||||
}
|
||||
change_mask |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
/* possibly change the file timestamps */
|
||||
@ -613,10 +614,12 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
|
||||
|
||||
*name = newstats;
|
||||
|
||||
if (change_mask != 0) {
|
||||
notify_trigger(pvfs->notify_context,
|
||||
NOTIFY_ACTION_MODIFIED,
|
||||
change_mask,
|
||||
name->full_name);
|
||||
}
|
||||
|
||||
return pvfs_dosattrib_save(pvfs, name, -1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user