[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14116: [PATCH] ln: allow to overwrite relative symlink
From: |
Rémy Lefevre |
Subject: |
bug#14116: [PATCH] ln: allow to overwrite relative symlink |
Date: |
Mon, 1 Apr 2013 16:40:59 +0200 |
Overwriting relative symlink leads to undesirable behavior. Consider the
following example:
# Create some directories
mkdir test
mkdir test/folder1
mkdir test/folder2
#Create some files
touch test/folder1/file1
touch test/folder1/file2
#Create a relative symlink in folder2 to file1
ln -sr test/folder1/file1 test/folder2/link
#Check the link
ls -l test/folder2/link
# Correctly output a link to ../folder1/file1
#Overwrite the symlink to point to file2
ln -sfr test/folder1/file2 test/folder2/link
#Check the link
ls -l test/folder2/link
# Wrongly output a link to file2 instead of ../folder1/file2
This undesirable behavior is due to a dereferencing of the target when the
relative path is computed. Passing CAN_NOLINKS flag to
canonicalize_filename_mode solves the problem.
patch.diff
Description: Binary data
- bug#14116: [PATCH] ln: allow to overwrite relative symlink,
Rémy Lefevre <=
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Pádraig Brady, 2013/04/01
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Rémy Lefevre, 2013/04/01
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Pádraig Brady, 2013/04/01
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Rémy Lefevre, 2013/04/02
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Pádraig Brady, 2013/04/03
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Bernhard Voelker, 2013/04/03
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Pádraig Brady, 2013/04/03
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Linda Walsh, 2013/04/07
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Pádraig Brady, 2013/04/07
- bug#14116: [PATCH] ln: allow to overwrite relative symlink, Eric Blake, 2013/04/08