comparison core/src/luan/modules/host/Hosting.luan @ 633:c5baaa525897

don't push hidden files to luanhost
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 25 Feb 2016 02:04:57 -0700
parents cc3a68033179
children ca169567ce07
comparison
equal deleted inserted replaced
632:ff45bb2adfd3 633:c5baaa525897
5 local ipairs = Luan.ipairs or error() 5 local ipairs = Luan.ipairs or error()
6 local pairs = Luan.pairs or error() 6 local pairs = Luan.pairs or error()
7 local Io = require "luan:Io" 7 local Io = require "luan:Io"
8 local print = Io.print or error() 8 local print = Io.print or error()
9 local Rpc = require "luan:Rpc" 9 local Rpc = require "luan:Rpc"
10 local String = require "luan:String"
11 local matches = String.matches or error()
10 12
11 13
12 local M = {} 14 local M = {}
13 15
14 M.port = 9101 16 M.port = 9101
38 if there == nil then 40 if there == nil then
39 there = host.mkdir(domain,password,there_parent.path,here.name()) 41 there = host.mkdir(domain,password,there_parent.path,here.name())
40 end 42 end
41 for _, here_child in ipairs(here.children()) do 43 for _, here_child in ipairs(here.children()) do
42 local name = here_child.name() 44 local name = here_child.name()
43 process(there,there.children[name],here_child) 45 if not matches(name,[[^\.]]) then
44 there.children[name] = nil 46 process(there,there.children[name],here_child)
47 there.children[name] = nil
48 end
45 end 49 end
46 for _, there_child in pairs(there.children) do 50 for _, there_child in pairs(there.children) do
47 if host.delete_unused(domain,password,there_child.path)==true then -- remove ==true later 51 if host.delete_unused(domain,password,there_child.path)==true then -- remove ==true later
48 print("deleted "..there_child.name) 52 print("deleted "..there_child.name)
49 end 53 end