From 90f82529517f8db18d32cd6c2d8b2036613a54c1 Mon Sep 17 00:00:00 2001 From: ewt Date: Wed, 14 Feb 1996 22:20:08 +0000 Subject: [PATCH] checks for directory existence before trying to create one CVS patchset: 275 CVS date: 1996/02/14 22:20:08 --- lib/install.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/install.c b/lib/install.c index ad50761..45de024 100644 --- a/lib/install.c +++ b/lib/install.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include "header.h" #include "install.h" #include "md5.h" +#include "misc.h" #include "package.h" #include "rpmerr.h" #include "rpmlib.h" @@ -683,6 +683,8 @@ static int mkdirIfNone(char * directory, mode_t perms) { if (*chptr != '/') break; if (!*chptr) return 0; + if (exists(directory)) return 0; + message(MESS_DEBUG, "trying to make %s\n", directory); rc = mkdir(directory, perms); -- 2.7.4