diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:09 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:09 +0000 |
commit | 969878fc6fed5e43b4f7e2e3ee46835d93d30dfd (patch) | |
tree | 6d146cc216a45535a527bf0feec723ee4a99f2c5 /src/library.c | |
parent | 8387908965317cc3cf2072187c20f617609a13b7 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'src/library.c')
-rw-r--r-- | src/library.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/library.c b/src/library.c index 3512649..b359c45 100644 --- a/src/library.c +++ b/src/library.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xcursor/library.c,v 1.2 2003/01/26 03:22:42 eich Exp $ + * $XFree86: xc/lib/Xcursor/library.c,v 1.4 2003/11/11 01:17:54 dawes Exp $ * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * @@ -101,12 +101,19 @@ _XcursorBuildThemeDir (const char *dir, const char *theme) if (!home) return 0; homelen = strlen (home); + /* A '/' gets prepended if $HOME doesn't start with one. */ + if (home[0] != '/') + homelen++; dir++; dirlen--; } len = homelen + dirlen + 1 + themelen + 1; + /* A '/' gets inserted if dir doesn't start with one. */ + if (dir[0] != '/') + len++; + full = malloc (len); if (!full) return 0; |