We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5765729 commit 6457294Copy full SHA for 6457294
src/core/opamSystem.ml
@@ -1653,8 +1653,16 @@ let internal_patch ~dir p =
1653
in
1654
let apply diff = match diff.Patch.operation with
1655
| Patch.Edit file ->
1656
- let file = get_path file in
1657
- let content = read file in
+ let file, content =
+ let file = get_path file in
1658
+ let content =
1659
+ if Sys.file_exists file then
1660
+ Some (read file)
1661
+ else
1662
+ None
1663
+ in
1664
+ (file, content)
1665
1666
let content = patch content diff in
1667
write file content
1668
| Patch.Rename (src, dst) ->
0 commit comments