]> git.e2factory.org Git - e2factory.git/commitdiff
replace custom mv() with e2lib.mv(), fix error message
authorTobias Ulmer <tu@emlix.com>
Thu, 1 Nov 2012 14:39:44 +0000 (15:39 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:11 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2-new-source.lua

index 22abca3cdda315f1467b735fe681ff1d362e0eab..4d036d082e9eb16edc1f24c87caff36982c454b9 100644 (file)
@@ -143,16 +143,6 @@ local function download(f)
     return true, nil
 end
 
-local function mv(s, d)
-    local cmd = string.format("mv %s %s", e2lib.shquote(s),
-    e2lib.shquote(d))
-    local rc = e2lib.callcmd_capture(cmd)
-    if rc ~= 0 then
-        return false, "mv failed"
-    end
-    return true, nil
-end
-
 --- new files source
 -- @param location string: server/location string
 -- @param source_file string: source file url
@@ -198,7 +188,7 @@ local function new_files_source(c, server, location, source_file, checksum_file,
         checksum_file_base = e2lib.basename(checksum_file)
         checksum_file1 = string.format("%s.orig",
         checksum_file_base)
-        rc = mv(checksum_file_base, checksum_file1)
+        rc, e = e2lib.mv(checksum_file_base, checksum_file1)
         if not rc then
             e2lib.abort(e)
         end