From 4b09b108fd4451c841a5c2fab5d833e6cd49b616 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 12 Mar 2025 23:40:34 +0300 Subject: [PATCH] fix file.parent --- res/scripts/stdmin.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/res/scripts/stdmin.lua b/res/scripts/stdmin.lua index 5e6ac294..1e551118 100644 --- a/res/scripts/stdmin.lua +++ b/res/scripts/stdmin.lua @@ -545,11 +545,11 @@ function file.prefix(path) end function file.parent(path) - local pos = path:find("/") - if not pos then + local dir = path:match("(.*)/") + if not dir then return file.prefix(path)..":" end - return path:sub(0, pos-1) + return dir end function file.path(path)