# HG changeset patch # User Ethan Blanton # Date 1069621408 0 # Node ID 48d7eea885989f77321b4573ed126ac716d3f448 # Parent 62d11301b8a66e9ce4f4e660239b8cf66af9a775 [gaim-migrate @ 8238] Hopefully this will fix the permissions errors some people are getting on mkdir(). I have _no_ idea why it's happening, so I don't know if this will work ... if anyone does know, please do tell. Also fix a one-off in the pathname creation which was causing '/' to be inserted twice at the root. committer: Tailor Script diff -r 62d11301b8a6 -r 48d7eea88598 src/util.c --- a/src/util.c Sun Nov 23 20:02:45 2003 +0000 +++ b/src/util.c Sun Nov 23 21:03:28 2003 +0000 @@ -1197,7 +1197,7 @@ return -1; dir = g_new0(char, strlen(path) + 1); - components = g_strsplit(path, delim, -1); + components = g_strsplit(path + 1, delim, -1); len = 0; for (cur = 0; components[cur] != NULL; cur++) { dir[len++] = G_DIR_SEPARATOR; @@ -1225,6 +1225,11 @@ g_free(dir); return -1; } + /* For some reason, the above mkdir doesn't properly + * set permissions for some people ... and I have NO + * idea why not. In the meantime, we'll attempt to + * set them explicitly. */ + chmod(dir, mode); } g_strfreev(components);