diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 20:43:50 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 20:43:50 +0100 |
commit | 1577b56f04f35bced3d0491baa80202165e2c489 (patch) | |
tree | 141cdf9cf30780142253ef6279e3d0a5f72baa48 | |
parent | 52ddc81f472551413584d17433e7ddfe7373f068 (diff) |
pm
-rw-r--r-- | pm.lua | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -90,6 +90,11 @@ local function dlfile(filename) local src=rbase..filename local dest="/"..filename print("downloading "..src.." to "..dest) + local dir = fs.getDir(dest) + if not fs.isDir(dir) then + print("creating directory "..dir) + fs.makeDir(dir) + end local file,err=fs.open(dest,"w") if err then error("fs.open "..err) end local res,err = http.get(src) |