summaryrefslogtreecommitdiff
path: root/pm.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-04 20:43:50 +0100
committerubq323 <ubq323@ubq323.website>2022-08-04 20:43:50 +0100
commit1577b56f04f35bced3d0491baa80202165e2c489 (patch)
tree141cdf9cf30780142253ef6279e3d0a5f72baa48 /pm.lua
parent52ddc81f472551413584d17433e7ddfe7373f068 (diff)
pm
Diffstat (limited to 'pm.lua')
-rw-r--r--pm.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/pm.lua b/pm.lua
index 381ff21..bf22cd5 100644
--- a/pm.lua
+++ b/pm.lua
@@ -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)