Skip to content

Commit cf934f4

Browse files
chore: refactoring
1 parent 43d135e commit cf934f4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

script/cli/doc/export.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ function export.getLocalPath(uri)
6060
local file_canonical = fs.canonical(furi.decode(uri)):string()
6161
local doc_canonical = fs.canonical(DOC):string()
6262
local relativePath = fs.relative(file_canonical, doc_canonical):string()
63-
local _, j = file_canonical:find(doc_canonical, 1, true)
64-
if not j then
63+
if relativePath == "" or relativePath:sub(1, 2) == '..' then
6564
-- not under project directory
6665
return '[FOREIGN] ' .. file_canonical
6766
end

0 commit comments

Comments
 (0)