Fix Unix.utimes not working for directories on Win32. (#8796)

master
Daniil Baturin 2020-11-03 17:03:35 +07:00 committed by GitHub
parent 8575a4b577
commit 0280127761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -294,6 +294,10 @@ OCaml 4.12.0
### Other libraries:
- #8796: On Windows, make Unix.utimes use FILE_FLAG_BACKUP_SEMANTICS flag
to allow it to work with directories.
(Daniil Baturin, review by Damien Doligez)
* #9206, #9419: update documentation of the threads library;
deprecate Thread.kill, Thread.wait_read, Thread.wait_write,
and the whole ThreadUnix module.

View File

@ -56,7 +56,7 @@ CAMLprim value unix_utimes(value path, value atime, value mtime)
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
FILE_FLAG_BACKUP_SEMANTICS,
NULL);
caml_leave_blocking_section();
caml_stat_free(wpath);