[Bug 367211] Re: sed -i destroys symlink

2017-10-24 Thread Aditya Gnaneshwar
can we have a similar option for a hard link file? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/367211 Title: sed -i destroys symlink To manage notifications about this bug go to:

[Bug 367211] Re: sed -i destroys symlink

2010-02-12 Thread Paolo Bonzini
Fixed in karmic thanks to update to sed-4.2.1 ** Changed in: sed (Ubuntu) Status: New = Fix Released -- sed -i destroys symlink https://bugs.launchpad.net/bugs/367211 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. --

[Bug 367211] Re: sed -i destroys symlink

2009-04-27 Thread Miek Gieben
This is due to using rename(), in the file lib/utils.c (is sed's source) at line 324 in the function: ck_rename (from, to, unlink_if_fail): int rd = rename (from, to); from is now a tmp-file and to is the original file. According to the manpage of rename(2): If oldpath refers

[Bug 367211] Re: sed -i destroys symlink

2009-04-27 Thread Miek Gieben
The following patch fixed the problem. It does so by looking at the target. If it is an symlink the tmp file will be copied to the target of the symlink. Patch also included as attachment. elektron.m% diff -ur sed-4.1.5/lib/utils.c sed-4.1.5-modified/lib/utils.c --- sed-4.1.5/lib/utils.c

[Bug 367211] Re: sed -i destroys symlink

2009-04-27 Thread Paolo Bonzini
sed 4.2 will provide --follow-symlinks, for now it is a feature that you cannot turn off. Sorry. -- sed -i destroys symlink https://bugs.launchpad.net/bugs/367211 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing