]> git.e2factory.org Git - e2factory.git/commitdiff
e2lib.directory: readable formatting
authorTobias Ulmer <tu@emlix.com>
Mon, 17 Sep 2012 10:21:19 +0000 (12:21 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:10 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 611219e6c1fcafd6ff87c896f9ff639b58419f95..f384bb323e8fb5e8c93cc2af2918aba06753afb7 100644 (file)
@@ -997,14 +997,17 @@ end
 function e2lib.directory(p, dotfiles, noerror)
     local dir = e2util.directory(p, dotfiles)
     if not dir then
-        if noerror then dir = {}
-        else e2lib.abort("directory `", p, "' does not exist")
+        if noerror then
+            dir = {}
+        else
+            e2lib.abort("directory `", p, "' does not exist")
         end
     end
     table.sort(dir)
     local i = 1
     local function nextfile(s)
-        if i > #s then return nil
+        if i > #s then
+            return nil
         else
             local j = i
             i = i + 1