Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=60af42b1402c544e254bf229403b1cd6bc45ed42

commit 60af42b1402c544e254bf229403b1cd6bc45ed42
Author: Laszlo Papp <djsza...@gmail.com>
Date:   Sat Oct 17 23:49:53 2009 +0200

Remove makepath function from frontend

remove makepath from the frontend because it is no longer used
(the code using it has probably moved to the backend and we have
_pacman_makepath there)

diff --git a/src/pacman-g2/util.c b/src/pacman-g2/util.c
index 855231f..9dae007 100644
--- a/src/pacman-g2/util.c
+++ b/src/pacman-g2/util.c
@@ -49,37 +49,6 @@ extern int maxcols;
extern config_t *config;
extern int neednl;

-/* does the same thing as 'mkdir -p' */
-int makepath(char *path)
-{
-       char *orig, *str, *ptr;
-       char full[PATH_MAX] = "";
-       mode_t oldmask;
-
-       oldmask = umask(0000);
-
-       orig = strdup(path);
-       str = orig;
-       while((ptr = strsep(&str, "/"))) {
-               if(strlen(ptr)) {
-                       struct stat buf;
-
-                       strcat(full, "/");
-                       strcat(full, ptr);
-                       if(stat(full, &buf)) {
-                               if(mkdir(full, 0755)) {
-                                       free(orig);
-                                       umask(oldmask);
-                                       return(1);
-                               }
-                       }
-               }
-       }
-       free(orig);
-       umask(oldmask);
-       return(0);
-}
-
/* does the same thing as 'rm -rf' */
int rmrf(char *path)
{
diff --git a/src/pacman-g2/util.h b/src/pacman-g2/util.h
index fbf9a01..fde7841 100644
--- a/src/pacman-g2/util.h
+++ b/src/pacman-g2/util.h
@@ -44,7 +44,6 @@

#define _(str) gettext(str)

-int makepath(char *path);
int rmrf(char *path);
void indentprint(char *str, int indent);
char *buildstring(list_t *strlist);
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to