1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

libsmbclient: Don't throw away nsec fields in stat()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2020-03-31 11:10:55 +02:00 committed by Ralph Boehme
parent b22b4daeba
commit 810397f89a

View File

@ -102,18 +102,18 @@ void setup_stat(struct stat *st,
}
st->st_dev = dev;
st->st_atime = convert_timespec_to_time_t(access_time_ts);
st->st_ctime = convert_timespec_to_time_t(change_time_ts);
st->st_mtime = convert_timespec_to_time_t(write_time_ts);
st->st_atim = access_time_ts;
st->st_ctim = change_time_ts;
st->st_mtim = write_time_ts;
}
void setup_stat_from_stat_ex(const struct stat_ex *stex,
const char *fname,
struct stat *st)
{
st->st_atime = convert_timespec_to_time_t(stex->st_ex_atime);
st->st_ctime = convert_timespec_to_time_t(stex->st_ex_ctime);
st->st_mtime = convert_timespec_to_time_t(stex->st_ex_mtime);
st->st_atim = stex->st_ex_atime;
st->st_ctim = stex->st_ex_ctime;
st->st_mtim = stex->st_ex_mtime;
st->st_mode = stex->st_ex_mode;
st->st_size = stex->st_ex_size;