mirror of
https://github.com/kepler155c/opus
synced 2024-12-28 17:40:26 +00:00
vfs bugfix
This commit is contained in:
parent
602d12afc5
commit
d72ae3de4a
@ -267,6 +267,16 @@ function fs.mount(path, fstype, ...)
|
||||
if not vfs then
|
||||
error('Invalid file system type')
|
||||
end
|
||||
|
||||
-- hack - get the mount point for the path
|
||||
-- ie. if packages is mapped to disk/packages
|
||||
-- and a request to mount /packages/foo
|
||||
-- then use disk/packages/foo as the mountPoint
|
||||
local n = getNode(path)
|
||||
if n.fstype == 'linkfs' then
|
||||
path = path:gsub(n.mountPoint, n.source, 1)
|
||||
end
|
||||
|
||||
local node = vfs.mount(path, ...)
|
||||
if node then
|
||||
local parts = splitpath(path)
|
||||
@ -279,9 +289,12 @@ function fs.mount(path, fstype, ...)
|
||||
end
|
||||
if not tp.nodes[d] then
|
||||
tp.nodes[d] = Util.shallowCopy(tp)
|
||||
|
||||
-- another related hack
|
||||
if tp.fstype == 'linkfs' then
|
||||
tp.nodes[d].source = fs.combine(tp.nodes[d].source, d)
|
||||
end
|
||||
|
||||
tp.nodes[d].nodes = { }
|
||||
tp.nodes[d].mountPoint = fs.combine(tp.mountPoint, d)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user