X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Ffilearch.c;fp=src%2Ffilearch.c;h=1802ec4750f30d7290aceaf60f6e48579ae9cfd2;hp=0ed64257226ec39f78eaafd031c908a939dcfa84;hb=690ff694ca6db586c06ec484ea158261c156aa2f;hpb=486cafd4acf4945bbf3fea541eaa320f5c419406 diff --git a/src/filearch.c b/src/filearch.c index 0ed6425..1802ec4 100644 --- a/src/filearch.c +++ b/src/filearch.c @@ -213,12 +213,7 @@ cpio_arch (guestfs_h *g, const char *file, const char *path) error (g, "file_architecture: could not determine architecture of cpio archive"); out: - /* Free up the temporary directory. Note the directory name cannot - * contain shell meta-characters because of the way it was - * constructed above. - */ - snprintf (cmd, cmd_len, "rm -rf %s", dir); - ignore_value (system (cmd)); + guestfs___remove_tmpdir (dir); return ret; #undef dir_len