From c660c192a0de5ad633b9dd412572b450277c40e1 Mon Sep 17 00:00:00 2001 From: Nulo Date: Sat, 18 Jun 2022 21:27:20 -0300 Subject: [PATCH] data: Crear carpetas parientes a los archivos --- modules/data.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/data.lua b/modules/data.lua index 11ebefb..ddba35e 100644 --- a/modules/data.lua +++ b/modules/data.lua @@ -1,3 +1,4 @@ +local utils = require "../utils" local t = require "../utils/templater" local dirs = {} @@ -8,10 +9,12 @@ local function generate_mount_data() if dir.type == "file" then touch(dir.mountpoint) string = string .. t([[ +mkdir -p '{{dirname}}' || exit 1 touch -a '{{path}}' || exit 1 mount '{{path}}' '{{mountpoint}}' -o bind,umask=100,uid={{uid}},gid={{gid}} || exit 1 ]], - dir + { dirname = utils.dirname(dir.path), + path = dir.path, mountpoint = dir.mountpoint, uid = dir.uid, gid = dir.gid } ) elseif dir.type == "dir" then mkdir(dir.mountpoint)