Skip to content

ln: don't refuse --backup when src/dst are different names for the same inode#13345

Open
Chaganti-Reddy wants to merge 2 commits into
uutils:mainfrom
Chaganti-Reddy:ln-backup-multilink-samefile
Open

ln: don't refuse --backup when src/dst are different names for the same inode#13345
Chaganti-Reddy wants to merge 2 commits into
uutils:mainfrom
Chaganti-Reddy:ln-backup-multilink-samefile

Conversation

@Chaganti-Reddy

Copy link
Copy Markdown
Contributor

ln --backup was rejecting any src/dst pair that happened to share an inode, even when they're two different hard-linked names - GNU only refuses when dst is the only remaining name for that inode (nlink == 1) or src/dst are literally the same entry. reused the canonicalize-based check the -f branch already had right, applied it to the backup check too. the fifo symptom in the issue was just a side effect of the early bail-out never reaching the actual backup rename.

Fixes #13166

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.

bug(ln): when <DST>existing is a pipe created by mkfifo, leads to spurious same file error messages and no backup created

1 participant