Skip to content

Conversation

@mtelvers
Copy link
Member

Under Windows, we map access to download caches through NTFS junction points. This effectively creates a file system directory which links to the cache drive. However, we did not remove the junction points when the cache is not present. During an opam pin, opam tries to create a folder under the download-cache/git directory (with no cache present). The junction refers to a location which doesn't exist at this time and therefore the opam command fails. This PR removes the junction when the cache is removed.

| Linux
| OpenBSD -> Lwt.return_unit
| Windows ->
(* if the junction isn't removed and the target drive is missing, then `mkdir -p <dst>/foo` fails *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "junction" mean in this context?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A "junction", or more fully, an NTFS junction point, is a specific type of file system symbolic link available on NTFS.

@mtelvers mtelvers merged commit b172bca into ocurrent:master Jan 18, 2025
9 checks passed
@mtelvers mtelvers deleted the pin-on-windows branch January 18, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants