diff options
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r-- | source3/smbd/dir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index ca6f8bfd8d..8531d6250d 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -841,6 +841,8 @@ bool get_dir_entry(TALLOC_CTX *ctx, mask_match_search(filename,mask,False) || mangle_mask_match(conn,filename,mask)) { char mname[13]; + struct timespec write_time_ts; + struct file_id fileid; if (!mangle_is_8_3(filename, False, conn->params)) { if (!name_to_8_3(filename,mname,False, @@ -883,6 +885,12 @@ bool get_dir_entry(TALLOC_CTX *ctx, *size = sbuf.st_size; *date = sbuf.st_mtime; + fileid = vfs_file_id_from_sbuf(conn, &sbuf); + write_time_ts = get_write_time(fileid); + if (!null_timespec(write_time_ts)) { + *date = convert_timespec_to_time_t(write_time_ts); + } + DEBUG(3,("get_dir_entry mask=[%s] found %s " "fname=%s (%s)\n", mask, |