]> git.e2factory.org Git - e2factory.git/commitdiff
quote template argument for mktemp, as a quick fix
authorGordon Hecker <gh@emlix.com>
Thu, 2 Apr 2009 12:18:10 +0000 (14:18 +0200)
committerGordon Hecker <gh@emlix.com>
Thu, 2 Apr 2009 12:18:10 +0000 (14:18 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
generic/e2lib.lua

index e99a0407b3758f3c5c5ec3f994fe780f2951c239..6dfc6d9b79155be10accfc187208fd8be29b2d97 100644 (file)
@@ -1256,7 +1256,7 @@ function e2lib.mktempfile(template)
     template = string.format("%s/e2tmp.%d.XXXXXXXX", e2lib.tmpdir,
                                                        e2util.getpid())
   end
-  local cmd = string.format("mktemp %s", template)
+  local cmd = string.format("mktemp '%s'", template)
   local mktemp = io.popen(cmd, "r")
   if not mktemp then
     e2lib.bomb("can't mktemp")
@@ -1297,7 +1297,7 @@ function e2lib.mktempdir(template)
     template = string.format("%s/e2tmp.%d.XXXXXXXX", e2lib.tmpdir,
                                                        e2util.getpid())
   end
-  local cmd = string.format("mktemp -d %s", template)
+  local cmd = string.format("mktemp -d '%s'", template)
   local mktemp = io.popen(cmd, "r")
   if not mktemp then
     e2lib.bomb("can't mktemp")