10 local data_path = "data"; |
10 local data_path = "data"; |
11 dm.set_data_path(data_path); |
11 dm.set_data_path(data_path); |
12 |
12 |
13 local _mkdir = {} |
13 local _mkdir = {} |
14 function mkdir(path) |
14 function mkdir(path) |
15 path = path:gsub("/", "\\"); |
15 if os.getenv("WINDIR") then |
|
16 -- I'm afraid it's true :( |
|
17 path = path:gsub("/", "\\"); |
|
18 end |
16 --print("mkdir",path); |
19 --print("mkdir",path); |
17 local x = io.popen("mkdir "..path.." 2>&1"):read("*a"); |
20 local x = io.popen("mkdir "..path.." 2>&1"):read("*a"); |
18 end |
21 end |
19 function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end |
22 function encode(s) return s and (s:gsub("%W", function (c) return string.format("%%%x", c:byte()); end)); end |
20 function getpath(username, host, datastore, ext) |
23 function getpath(username, host, datastore, ext) |