mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
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
This commit is contained in:
parent
45c9838141
commit
2e96f68445
@ -394,6 +394,11 @@ int mkpath(const char *path, int mode)
|
|||||||
g_return_val_if_fail(path != NULL, -1);
|
g_return_val_if_fail(path != NULL, -1);
|
||||||
|
|
||||||
p = g_path_skip_root((char *) path);
|
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 (;;) {
|
for (;;) {
|
||||||
if (*p != G_DIR_SEPARATOR && *p != '\0') {
|
if (*p != G_DIR_SEPARATOR && *p != '\0') {
|
||||||
p++;
|
p++;
|
||||||
|
Loading…
Reference in New Issue
Block a user