From: Gordon Hecker Date: Wed, 18 Nov 2009 13:00:55 +0000 (+0100) Subject: bugfix: fix error handling in e2lib.mktempfile() and e2lib.mktempdir() X-Git-Tag: e2factory-2.3.3rc1~14 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=0c718317763383fad06066789a4ff0ae215847de;p=e2factory.git bugfix: fix error handling in e2lib.mktempfile() and e2lib.mktempdir() Signed-off-by: Gordon Hecker --- diff --git a/generic/e2lib.lua b/generic/e2lib.lua index b37ce02..a3a861a 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -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