Allow $TMPDIR to override most temporary directory uses.
[libguestfs.git] / fish / edit.c
index 4c06e86..58b4a59 100644 (file)
@@ -34,7 +34,7 @@
 int
 run_edit (const char *cmd, int argc, char *argv[])
 {
-  char filename[] = "/tmp/guestfishXXXXXX";
+  TMP_TEMPLATE_ON_STACK (filename);
   char buf[256];
   const char *editor;
   struct stat oldstat, newstat;