summaryrefslogtreecommitdiff
path: root/src/core/misc.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-02-13 13:12:29 +0100
committerLemonBoy <thatlemon@gmail.com>2016-06-05 16:24:55 +0200
commitbb190be0bfac956ada4f74a514ff70f28b114efa (patch)
tree5abd9b45a6a65e0f0ed02e1885a4c2b671367718 /src/core/misc.c
parent1a6ec1b0b63c4ffbaf22137157a6fae3570b6839 (diff)
downloadirssi-bb190be0bfac956ada4f74a514ff70f28b114efa.zip
Replace mkpath with g_mkdir_with_parents
Diffstat (limited to 'src/core/misc.c')
-rw-r--r--src/core/misc.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/core/misc.c b/src/core/misc.c
index c26610ec..a8a0975a 100644
--- a/src/core/misc.c
+++ b/src/core/misc.c
@@ -407,44 +407,6 @@ int regexp_match(const char *str, const char *regexp)
#endif
}
-/* Create the directory and all it's parent directories */
-int mkpath(const char *path, int mode)
-{
- struct stat statbuf;
- const char *p;
- char *dir;
-
- 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++;
- continue;
- }
-
- dir = g_strndup(path, (int) (p-path));
- if (stat(dir, &statbuf) != 0) {
- if (mkdir(dir, mode) == -1)
- {
- g_free(dir);
- return -1;
- }
- }
- g_free(dir);
-
- if (*p++ == '\0')
- break;
- }
-
- return 0;
-}
-
/* convert ~/ to $HOME */
char *convert_home(const char *path)
{