mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-19 18:08:21 +01:00
Merge branch 'master' of github.com:lxsang/antd-web-apps
This commit is contained in:
commit
aec0ae5bb7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user