Mercurial > pidgin
comparison src/util.c @ 7633:ee6c31982350
[gaim-migrate @ 8258]
win32, you go to hell. you go to hell and you die!
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 25 Nov 2003 21:49:42 +0000 |
parents | 925c3ad6531b |
children | 0351ff7030d0 |
comparison
equal
deleted
inserted
replaced
7632:925c3ad6531b | 7633:ee6c31982350 |
---|---|
1196 | 1196 |
1197 dir = g_new0(char, strlen(path) + 1); | 1197 dir = g_new0(char, strlen(path) + 1); |
1198 components = g_strsplit(path, delim, -1); | 1198 components = g_strsplit(path, delim, -1); |
1199 len = 0; | 1199 len = 0; |
1200 for (cur = 0; components[cur] != NULL; cur++) { | 1200 for (cur = 0; components[cur] != NULL; cur++) { |
1201 /* If you don't know what you're doing on both | |
1202 * win32 and *NIX, stay the hell away from this code */ | |
1203 if(cur > 1) | |
1204 dir[len++] = G_DIR_SEPARATOR; | |
1201 strcpy(dir + len, components[cur]); | 1205 strcpy(dir + len, components[cur]); |
1202 len += strlen(components[cur]); | 1206 len += strlen(components[cur]); |
1203 dir[len++] = G_DIR_SEPARATOR; | 1207 if(cur == 0) |
1208 dir[len++] = G_DIR_SEPARATOR; | |
1204 | 1209 |
1205 if(g_file_test(dir, G_FILE_TEST_IS_DIR)) { | 1210 if(g_file_test(dir, G_FILE_TEST_IS_DIR)) { |
1206 continue; | 1211 continue; |
1207 } else if(g_file_test(dir, G_FILE_TEST_EXISTS)) { | 1212 } else if(g_file_test(dir, G_FILE_TEST_EXISTS)) { |
1208 gaim_debug(GAIM_DEBUG_WARNING, "build_dir", "bad path: %s\n", path); | 1213 gaim_debug(GAIM_DEBUG_WARNING, "build_dir", "bad path: %s\n", path); |