From 1577b56f04f35bced3d0491baa80202165e2c489 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 4 Aug 2022 20:43:50 +0100 Subject: pm --- pm.lua | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3