summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-11-25 20:54:24 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-11-25 20:54:24 +0000
commit2e96f68445fc079b142dca7964c831bbe778181b (patch)
treec6fd9c0e0defb320fcbfd12aab429bbda90fdf6c /src
parent45c9838141a9ef15d718d07a908d97d90dd5aa15 (diff)
downloadirssi-2e96f68445fc079b142dca7964c831bbe778181b.zip
mkpath() crashed with paths that didn't start with /
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@867 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/misc.c b/src/core/misc.c
index d57c4881..9115f29a 100644
--- a/src/core/misc.c
+++ b/src/core/misc.c
@@ -394,6 +394,11 @@ int mkpath(const char *path, int mode)
g_return_val_if_fail(path != NULL, -1);
p = g_path_skip_root((char *) path);
+ if (p == NULL) {
+ /* not a full path, maybe not what we wanted
+ but continue anyway.. */
+ p = path;
+ }
for (;;) {
if (*p != G_DIR_SEPARATOR && *p != '\0') {
p++;