]> git.e2factory.org Git - e2factory.git/commitdiff
e2build: abort if there is a non regular file in proj/init
authorFabian Godehardt <fg@emlix.com>
Wed, 19 Sep 2012 05:34:35 +0000 (07:34 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:12 +0000 (19:07 +0100)
Signed-off-by: Fabian Godehardt <fg@emlix.com>
local/e2build.lua

index 7594157a0993d10c382533ea99a036f3b2c92bec..2f03b017f35fb03915a5b43e12bb0044cd424028 100644 (file)
@@ -681,7 +681,14 @@ local function sources(info, r, return_flags)
         for x in e2lib.directory(info.root .. "/proj/init") do
             if not e2lib.is_backup_file(x) then
                 local location = string.format("proj/init/%s", x)
+                local abslocation = string.format("%s/%s", info.root, location)
                 local destdir = string.format("%s/init", res.build_config.T)
+
+                if not e2lib.isfile(abslocation) then
+                    return false, e:append("'%s' is not a regular file",
+                        abslocation)
+                end
+
                 rc, re = transport.fetch_file(info.root_server, location, destdir)
                 if not rc then
                     return false, e:cat(re)