summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_cmd.c
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-15 19:13:12 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-15 19:13:12 (EST)
commit9dd3216ffcf2c95e35ef097a0c8c3f2898bbde62 (patch)
treec61840a69a28f4b6f7770ee0537add8507bd6e09 /libopkg/opkg_cmd.c
parentec04e0fa180e0ad7c3ba118c2e40bb56663b3903 (diff)
Add a function for recursive directory removal and use that instead of xsystem.
git-svn-id: http://opkg.googlecode.com/svn/trunk@311 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_cmd.c')
-rw-r--r--libopkg/opkg_cmd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index 9a49082..c40694e 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -323,7 +323,6 @@ static opkg_intercept_t opkg_prep_intercepts(opkg_conf_t *conf)
static int opkg_finalize_intercepts(opkg_intercept_t ctx)
{
- char *cmd;
DIR *dir;
int err = 0;
@@ -349,10 +348,7 @@ static int opkg_finalize_intercepts(opkg_intercept_t ctx)
} else
perror (ctx->statedir);
- sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir);
- err = xsystem (cmd);
- free (cmd);
-
+ rm_r(ctx->statedir);
free (ctx->statedir);
free (ctx);