]> git.e2factory.org Git - e2factory.git/commitdiff
bugfix: fix error handling in e2lib.mktempfile() and e2lib.mktempdir()
authorGordon Hecker <gh@emlix.com>
Wed, 18 Nov 2009 13:00:55 +0000 (14:00 +0100)
committerGordon Hecker <gh@emlix.com>
Wed, 18 Nov 2009 13:02:13 +0000 (14:02 +0100)
Signed-off-by: Gordon Hecker <gh@emlix.com>
generic/e2lib.lua

index b37ce02c24490c348c96a97a77868e6ff172cc77..a3a861abb7d12fc7129aa37b4ffec9b18bd8aa1d 100644 (file)
@@ -1370,11 +1370,11 @@ function e2lib.mktempfile(template)
   local cmd = string.format("mktemp '%s'", template)
   local mktemp = io.popen(cmd, "r")
   if not mktemp then
-    e2lib.bomb("can't mktemp")
+    e2lib.abort("can't mktemp")
   end
   local tmp = mktemp:read()
   if not tmp then
-    e2lib.bomb("can't mktemp")
+    e2lib.abort("can't mktemp")
   end
   mktemp:close()
   -- register tmp for removing with rmtempfiles() later on
@@ -1411,11 +1411,11 @@ function e2lib.mktempdir(template)
   local cmd = string.format("mktemp -d '%s'", template)
   local mktemp = io.popen(cmd, "r")
   if not mktemp then
-    e2lib.bomb("can't mktemp")
+    e2lib.abort("can't mktemp")
   end
   local tmpdir = mktemp:read()
   if not tmpdir then
-    e2lib.bomb("can't mktemp")
+    e2lib.abort("can't mktemp")
   end
   mktemp:close()
   -- register tmpdir for removing with rmtempdirs() later on