]> git.e2factory.org Git - e2factory.git/commitdiff
cache: whitespace fixes
authorTobias Ulmer <tu@emlix.com>
Fri, 23 May 2014 15:31:55 +0000 (17:31 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/cache.lua

index 20b0506b577b3ea0b730a3c29d508afe6d4c2956..5a8cb0e1910981991b4e0e15c29bfbc2655b7fe1 100644 (file)
@@ -372,6 +372,7 @@ function cache.push_file(c, sourcefile, server, location, flags)
         if not rc then
             return false, e:cat(re)
         end
+
         rc, re = cache.writeback(c, server, location, flags)
         if not rc then
             return false, e:cat(re)
@@ -380,8 +381,7 @@ function cache.push_file(c, sourcefile, server, location, flags)
         -- cache is disabled
         -- push the file from source to destination immediately
         rc, re = transport.push_file(sourcefile, ce.remote_url,
-        location, ce.flags.push_permissions,
-        flags.try_hardlink)
+            location, ce.flags.push_permissions, flags.try_hardlink)
         if not rc then
             return false, e:cat(re)
         end
@@ -399,18 +399,22 @@ end
 function cache.writeback(c, server, location, flags)
     local e = err.new("writeback failed")
     local rc, re
+
     local ce, re = cache.ce_by_server(c, server)
     if not ce then
         return false, e:cat(re)
     end
+
     local ceurl, re = url.parse(ce.cache_url)
     if not ceurl then
         return false, e:cat(re)
     end
+
     if flags.writeback == false or
         (ce.flags.writeback == false and flags.writeback ~= true) then
         return true
     end
+
     local sourcefile = string.format("/%s/%s", ceurl.path, location)
     rc, re = transport.push_file(sourcefile, ce.remote_url, location,
         ce.flags.push_permissions, flags.try_hardlink)