git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Add guestfs___remove_tmpdir helper function.
[libguestfs.git]
/
src
/
filearch.c
diff --git
a/src/filearch.c
b/src/filearch.c
index
0ed6425
..
1802ec4
100644
(file)
--- 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:
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
return ret;
#undef dir_len