Skip to content

Handle dangling Xcode selection symlinks - #6

Merged
MattKiazyk merged 1 commit into
XcodesOrg:mainfrom
hstdt:fix/dangling-xcode-symlink
Sep 8, 2026
Merged

MattKiazyk merged 1 commit into
XcodesOrg:mainfrom
hstdt:fix/dangling-xcode-symlink

Conversation

@hstdt

@hstdt hstdt commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Problem

Creating a new selection link fails when /Applications/Xcode.app is a dangling symlink.

FileManager.fileExists(atPath:) follows symlinks and returns false when the destination is missing. As a result, the existing symlink is not removed, and creating its replacement fails because an item named Xcode.app still exists.

Changes

Use attributesOfItem(atPath:) to inspect the filesystem entry itself, allowing dangling symlinks to be identified and replaced.

Real Xcode app bundles remain protected from being overwritten.

@MattKiazyk

Copy link
Copy Markdown
Contributor

Thanks!

@MattKiazyk
MattKiazyk merged commit b4dd917 into XcodesOrg:main Sep 8, 2026
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