Skip to content

Commit

Permalink
Revert "bee-dep: fixes creating of cache directory"
Browse files Browse the repository at this point in the history
This reverts commit 00d9a8d.
  • Loading branch information
mariux committed Dec 19, 2011
1 parent f3cd517 commit 42bd485
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/bee-dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,6 @@ static FILE *open_and_lock(char *filename, char *mode)
return f;
}

int mkdirp(char *path, mode_t mode)
{
char *dir, *pdir;
struct stat st;

if(path == NULL) {
return -1;
}

dir = strdup(path);
pdir = dirname(dir);
if(stat(pdir, &st) == -1) {
mkdirp(pdir, mode);
}

free(dir);

return mkdir(path, mode);
}

int main(int argc, char *argv[])
{
int c, help, rebuild, update, remove, print, options;
Expand Down Expand Up @@ -260,7 +240,7 @@ int main(int argc, char *argv[])
dir = strdup(cachefile);
dir = dirname(dir);

if (stat(dir, &st) == -1 && mkdirp(dir, 0755) == -1) {
if (stat(dir, &st) == -1 && mkdir(dir, 0755) == -1) {
perror("bee-dep: mkdir");
exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit 42bd485

Please sign in to comment.