Skip to content

Commit ca4d39b

Browse files
committed
Another different Sys.rename error message
1 parent 5c494b0 commit ca4d39b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sys/stm_tests.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ struct
331331
(s = "No such file or directory" && Sys.win32 && old_path = new_path && path_is_an_empty_dir fs new_path) ||
332332
(s = "No such file or directory" &&
333333
not (Model.mem fs old_path) || List.exists (fun pref -> not (path_is_a_dir fs pref)) (path_prefixes new_path)) ||
334-
(s = "Invalid argument" && is_true_prefix old_path new_path) ||
334+
((s = "Invalid argument" || s = "Permission denied"(*Win32*)) && is_true_prefix old_path new_path) ||
335335
(s = "Not a directory" &&
336336
List.exists (path_is_a_file fs) (path_prefixes old_path) ||
337337
List.exists (path_is_a_file fs) (path_prefixes new_path) ||
338338
path_is_a_dir fs old_path && Model.mem fs new_path && not (path_is_a_dir fs new_path)) ||
339-
((s = "Is a directory" || s = "Permission denied") && path_is_a_dir fs new_path) ||
339+
((s = "Is a directory" || s = "Permission denied"(*Win32*)) && path_is_a_dir fs new_path) ||
340340
(s = "Directory not empty" &&
341341
is_true_prefix new_path old_path || (path_is_a_dir fs new_path && not (path_is_an_empty_dir fs new_path)))
342342
| Error _ -> false)

0 commit comments

Comments
 (0)