From e775e9d7e749da442b7fed62dab26ea099c3b84d Mon Sep 17 00:00:00 2001 From: Dany LE Date: Sun, 21 Aug 2022 16:26:57 +0200 Subject: [PATCH] Update vfs.lua --- os/libs/vfs.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/os/libs/vfs.lua b/os/libs/vfs.lua index a5b74f0..d86e18a 100644 --- a/os/libs/vfs.lua +++ b/os/libs/vfs.lua @@ -3,16 +3,16 @@ local vfs = {} vfs.ospath = function(path) local user = SESSION.user - local prefix = string.match(path, "%a+://") + local prefix = string.match(path, "%a+:/") if(prefix ~= nil) then local suffix = string.gsub(path,prefix,"") - if prefix == "home://" then + if prefix == "home:/" then return string.format(VFS_HOME,user)..'/'..suffix - elseif prefix == "desktop://" then + elseif prefix == "desktop:/" then return string.format(VFS_HOME,user).."/.desktop/"..suffix - elseif prefix == "shared://" then + elseif prefix == "shared:/" then return require("shared").ospath(std.trim(suffix,"/")) - elseif prefix == "os://" then + elseif prefix == "os:/" then return WWW_ROOT.."/"..suffix else return nil