Skip to content

refactor(stdune): handle symlink collisions using EEXIST - #16830

Merged
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:push-tlnkomqrzoqu
Oct 29, 2026
Merged

Alizter merged 1 commit into
ocaml:mainfrom
Alizter:push-tlnkomqrzoqu

Conversation

@Alizter

@Alizter Alizter commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Try symlink creation first and handle EEXIST only when overwriting is allowed. Preserve the existing overwrite policy.

Follow-up to merged #16828.

@Alizter
Alizter force-pushed the push-tlnkomqrzoqu branch 4 times, most recently from 8dd8b4d to 4b2683f Compare October 28, 2026 19:34
@Alizter
Alizter marked this pull request as ready for review October 28, 2026 19:35
Comment thread otherlibs/stdune/src/io.ml Resolved
Attempt symlink creation before inspecting the destination. Only handle
EEXIST when overwriting is allowed, preserving identical-link no-ops and
replacement of existing symlinks only. Propagate the original creation
error for existing regular files and directories.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter
Alizter merged commit 544dcfc into ocaml:main Oct 29, 2026
37 checks passed
@Alizter
Alizter deleted the push-tlnkomqrzoqu branch October 29, 2026 16:56
@Alizter Alizter added this to the 3.26.0 milestone Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants