summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:48:39 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-26 22:48:39 +0000
commit2f241334d765ff17777a756afc81e8da6a9f1ff2 (patch)
tree6d146cc216a45535a527bf0feec723ee4a99f2c5 /src
parent3b84b14bf06840d5cd446f2aba495108d23d66d7 (diff)
merge latest (4.3.99.16) from XFree86 (vendor) branch
Diffstat (limited to 'src')
-rw-r--r--src/library.c9
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;