diff options
author | Nikias Bassen | 2013-07-04 15:45:54 +0200 |
---|---|---|
committer | Nikias Bassen | 2013-07-04 15:45:54 +0200 |
commit | 8cc32db613b5cdae0820b026d7a85e88c46c81a6 (patch) | |
tree | 5670c16172a36ffd7f0a3a20e530adf7f28c2c49 /src/common.c | |
parent | 0747f8e0c20fed69a53d4782530bc848e4e13b08 (diff) | |
download | idevicerestore-8cc32db613b5cdae0820b026d7a85e88c46c81a6.tar.gz idevicerestore-8cc32db613b5cdae0820b026d7a85e88c46c81a6.tar.bz2 |
common: do not recurse mkdir_with_parents if dirname(dir) == dir
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c index f7ad7e6..b95b5e3 100644 --- a/src/common.c +++ b/src/common.c @@ -236,7 +236,7 @@ int mkdir_with_parents(const char *dir, int mode) int res; char *parent = strdup(dir); parent = dirname(parent); - if (parent && (strcmp(parent, ".") != 0)) { + if (parent && (strcmp(parent, ".") != 0) && (strcmp(parent, dir) != 0)) { res = mkdir_with_parents(parent, mode); } else { res = -1; |