Skip to content

Commit 117d3a8

Browse files
committed
don't handle ../?.lua for now
1 parent db8127a commit 117d3a8

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

script/workspace/require-path.lua

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,6 @@ function mt:getRequireResultByPath(path)
9898
end
9999
end
100100

101-
-- handle `../?.lua`
102-
local parentCount = 0
103-
for _ = 1, 1000 do
104-
if searcher:match '^%.%.[/\\]' then
105-
parentCount = parentCount + 1
106-
searcher = searcher:sub(4)
107-
else
108-
break
109-
end
110-
end
111-
if parentCount > 0 then
112-
local parentPath = libraryPath
113-
or (self.scp.uri and furi.decode(self.scp.uri))
114-
if parentPath then
115-
local tail
116-
for _ = 1, parentCount do
117-
parentPath, tail = parentPath:match '^(.+)[/\\]([^/\\]*)$'
118-
currentPath = tail .. '/' .. currentPath
119-
end
120-
end
121-
end
122-
123101
repeat
124102
cutedPath = currentPath:sub(pos)
125103
head = currentPath:sub(1, pos - 1)

0 commit comments

Comments
 (0)