forked from pool/timezone
Marcus Meissner
6620a7ba51
- Fix check for empty components in absolute path - Fix post-install script to overwrite the temporary file when attempting to create /etc/localtime as a hard link [bsc#928841] - Update to 2015d [bsc#928584, bsc#928246] OBS-URL: https://build.opensuse.org/request/show/307993 OBS-URL: https://build.opensuse.org/package/show/Base:System/timezone?expand=0&rev=160
28 lines
862 B
Diff
28 lines
862 B
Diff
Index: timezone-2015d/zic.c
|
|
===================================================================
|
|
--- timezone-2015d.orig/zic.c
|
|
+++ timezone-2015d/zic.c
|
|
@@ -757,7 +757,7 @@ dolink(const char *const fromfield, cons
|
|
|
|
result = link(fromname, toname);
|
|
if (result != 0) {
|
|
- const char *s = fromfield;
|
|
+ const char *s = fromname;
|
|
const char *t;
|
|
char *p;
|
|
size_t dotdots = 0;
|
|
@@ -766,10 +766,10 @@ dolink(const char *const fromfield, cons
|
|
do
|
|
t = s;
|
|
while ((s = strchr(s, '/'))
|
|
- && ! strncmp (fromfield, tofield,
|
|
- ++s - fromfield));
|
|
+ && ! strncmp (fromname, tofield,
|
|
+ ++s - fromname));
|
|
|
|
- for (s = tofield + (t - fromfield); *s; s++)
|
|
+ for (s = tofield + (t - fromname); *s; s++)
|
|
dotdots += *s == '/';
|
|
symlinkcontents
|
|
= emalloc(3 * dotdots + strlen(t) + 1);
|