Fix fd_filestat_set_times and enable the fd_filestat_set test on Windows.

This commit is contained in:
Marcin Mielniczuk
2019-08-12 09:24:45 +02:00
committed by Jakub Konka
parent 2f1afc4846
commit 74d1c11fbe
2 changed files with 3 additions and 4 deletions

View File

@@ -766,10 +766,10 @@ pub(crate) fn fd_filestat_set_times(
let st_mtim = dec_timestamp(st_mtim);
let fst_flags = dec_fstflags(fst_flags);
let set_atim = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
let set_atim_now = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
let set_atim = fst_flags & host::__WASI_FILESTAT_SET_ATIM != 0;
let set_atim_now = fst_flags & host::__WASI_FILESTAT_SET_ATIM_NOW != 0;
let set_mtim = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
let set_mtim_now = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
let set_mtim_now = fst_flags & host::__WASI_FILESTAT_SET_MTIM_NOW != 0;
if (set_atim && set_atim_now) || (set_mtim && set_mtim_now) {
return Err(host::__WASI_EINVAL);