Skip to content

Commit

Permalink
Fix Sys.remove on directory on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jmid committed May 8, 2023
1 parent 4b43eb4 commit 7f10339
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sys/stm_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ struct
| Ok () -> mem_model fs complete_path && path_is_a_dir fs path && not (path_is_a_dir fs complete_path)
| Error (Sys_error s) ->
(s = (p complete_path) ^ ": No such file or directory" && not (mem_model fs complete_path)) ||
(s = (p complete_path) ^ ": Is a directory" && path_is_a_dir fs complete_path) ||
(s = (p complete_path) ^ ": Operation not permitted" && path_is_a_dir fs complete_path) ||
(s = (p complete_path) ^ ": Is a directory" && path_is_a_dir fs complete_path) || (*Linux*)
(s = (p complete_path) ^ ": Operation not permitted" && path_is_a_dir fs complete_path) || (*macOS*)
(s = (p complete_path) ^ ": Permission denied" && path_is_a_dir fs complete_path) || (*Win*)
(s = (p complete_path) ^ ": Not a directory" && not (path_is_a_dir fs path))
| Error _ -> false
)
Expand Down

0 comments on commit 7f10339

Please sign in to comment.