Commit 8dce69081b2f7acd5fb50013d91e9fcf32194db3
1 parent
9ad697c8
配表由两个位置读取
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
src/services/csvdatad.lua
... | ... | @@ -8,7 +8,7 @@ require "csvdata.init" |
8 | 8 | require "skynet.manager" |
9 | 9 | require "RedisKeys" |
10 | 10 | |
11 | -local csvdb = {} | |
11 | +-- local csvdb = {} | |
12 | 12 | |
13 | 13 | local function formatFileName(filename) |
14 | 14 | filename = string.trim(filename) |
... | ... | @@ -33,14 +33,14 @@ local function travCsv(rootPath, pathes) |
33 | 33 | modified = travCsv(pathfile, pathes) or modified |
34 | 34 | else |
35 | 35 | local basename, loadname = formatFileName(pathfile) |
36 | - if basename and tonum(pathes[loadname]) < attrs.modification then | |
37 | - modified = true | |
38 | - if basename == "init" then | |
36 | + if basename then | |
37 | + if tonum(pathes[loadname]) < attrs.modification then | |
38 | + modified = true | |
39 | + pathes[loadname] = attrs.modification | |
40 | + end | |
41 | + if basename == "init" or basename == "init_adv" then | |
39 | 42 | require(loadname) |
40 | - else | |
41 | - csvdb[basename .. "Csv"] = require(loadname) | |
42 | 43 | end |
43 | - pathes[loadname] = attrs.modification | |
44 | 44 | end |
45 | 45 | end |
46 | 46 | end | ... | ... |