You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Windows, one needs to remove the original file before renaming the temporary one, or one gets Sys_error("File exists"). Before removing the original file, one needs to close the in-channel (which is a good idea anyway), or one gets Sys_error("foo.ml: Permission denied")
We currently use locally:
let ic = open_in path intry
indent_channel ic args config out;
close_in ic;
match out, need_move with|Somesrc, Somedst -> Sys.remove dst; Sys.rename src dst
|_, _ -> ()withe ->
close_in ic; raise e
but this should be improved to avoid the double-close when an error is raised by Sys.remove or Sys.rename.
The text was updated successfully, but these errors were encountered:
Under Windows, one needs to remove the original file before renaming the temporary one, or one gets Sys_error("File exists"). Before removing the original file, one needs to close the in-channel (which is a good idea anyway), or one gets Sys_error("foo.ml: Permission denied")
We currently use locally:
but this should be improved to avoid the double-close when an error is raised by Sys.remove or Sys.rename.
The text was updated successfully, but these errors were encountered: