Mercurial > pidgin
comparison src/ft.c @ 3630:9682c0e022c6
[gaim-migrate @ 3753]
Yeah this will probably break a lot of shit knowing my luck. But hey, I really don't care what people thnk.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 11 Oct 2002 03:14:01 +0000 |
parents | e9f66d245253 |
children | d7e83b4db191 |
comparison
equal
deleted
inserted
replaced
3629:afc5bb164c5a | 3630:9682c0e022c6 |
---|---|
459 } | 459 } |
460 | 460 |
461 /* Two functions, one recursive, just to make a directory. Yuck. */ | 461 /* Two functions, one recursive, just to make a directory. Yuck. */ |
462 static int ft_mkdir_help(char *dir) { | 462 static int ft_mkdir_help(char *dir) { |
463 int ret; | 463 int ret; |
464 | 464 #ifndef _WIN32 |
465 ret = mkdir(dir, 0775); | 465 ret = mkdir(dir, 0775); |
466 #else | |
467 ret = _mkdir(dir); | |
468 #endif | |
466 if (ret) { | 469 if (ret) { |
467 char *index = strrchr(dir, G_DIR_SEPARATOR); | 470 char *index = strrchr(dir, G_DIR_SEPARATOR); |
468 if (!index) | 471 if (!index) |
469 return -1; | 472 return -1; |
470 *index = '\0'; | 473 *index = '\0'; |
471 ret = ft_mkdir_help(dir); | 474 ret = ft_mkdir_help(dir); |
472 *index = G_DIR_SEPARATOR; | 475 *index = G_DIR_SEPARATOR; |
473 if (!ret) | 476 if (!ret) |
477 #ifndef _WIN32 | |
474 ret = mkdir(dir, 0775); | 478 ret = mkdir(dir, 0775); |
479 #else | |
480 ret = _mkdir(dir); | |
481 #endif | |
475 } | 482 } |
476 | 483 |
477 return ret; | 484 return ret; |
478 } | 485 } |
479 | 486 |