improved follow.patch to better handle symlinks.
This commit is contained in:
parent
d0acf9f5b4
commit
fa98db27c5
@ -71,10 +71,10 @@ diff -Burp sed-4.1.5-orig/lib/utils.c sed-4.1.5-follow/lib/utils.c
|
||||
+ buf2 [err] = '\0';
|
||||
+
|
||||
+ /* need to handle relative paths with care */
|
||||
+ if (buf2[0] != '/')
|
||||
+ dir = dirname (buf); // dir part of orig path
|
||||
+ int len = strlen (dir); // orig path len
|
||||
+ if (buf2[0] != '/' && len != 1 && dir[0] != '.')
|
||||
+ {
|
||||
+ dir = dirname (buf); // dir part of orig path
|
||||
+ int len = strlen (dir); // orig path len
|
||||
+ buf[len] = '/';
|
||||
+ strncpy (buf+len+1, buf2, bufsize - len - 1);
|
||||
+ if (buf[bufsize-1] != 0)
|
||||
|
6
sed.spec
6
sed.spec
@ -6,7 +6,7 @@
|
||||
Summary: A GNU stream text editor
|
||||
Name: sed
|
||||
Version: 4.1.5
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/Text
|
||||
URL: http://sed.sourceforge.net/
|
||||
@ -70,6 +70,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 13 2008 Jiri Moskovcak <jmoskovc@redhat.com> 4.1.5-11
|
||||
- improved follow.patch (thanks to Arkadiusz Miskiewicz for initial patch)
|
||||
- Resolves: #470912
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.1.5-10
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user