From: Panu Matilainen Date: Fri, 4 Apr 2008 13:08:37 +0000 (+0300) Subject: Rip the url-craziness in rpmMkdirPath() X-Git-Tag: tznext/4.11.0.1.tizen20130304~4479 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed3eb18dc26f87d8bffdd1a05d26dd962b7f6f2d;p=tools%2Flibrpm-tizen.git Rip the url-craziness in rpmMkdirPath() --- diff --git a/lib/misc.c b/lib/misc.c index 3a2cb03..15d5a9d 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -7,8 +7,6 @@ /* just to put a marker in librpm.a */ const char * const RPMVERSION = VERSION; -#include -#include /* XXX for rpmGetPath */ #include #include "lib/misc.h" @@ -21,20 +19,8 @@ rpmRC rpmMkdirPath (const char * dpath, const char * dname) int rc; if ((rc = stat(dpath, &st)) < 0) { - int ut = urlPath(dpath, NULL); - switch (ut) { - case URL_IS_PATH: - case URL_IS_UNKNOWN: - if (errno != ENOENT) - break; - case URL_IS_HTTPS: - case URL_IS_HTTP: - case URL_IS_FTP: + if (errno == ENOENT) { rc = mkdir(dpath, 0755); - break; - case URL_IS_DASH: - case URL_IS_HKP: - break; } if (rc < 0) { rpmlog(RPMLOG_ERR, _("cannot create %%%s %s\n"), dname, dpath);