Fix absolute path detection in `core.project_absolute_path`

This commit is contained in:
Guldoman 2021-09-02 18:58:24 +02:00
parent fb45b27da5
commit 46d1203d08
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 1 additions and 1 deletions

View File

@ -809,7 +809,7 @@ end
-- This function should get only filenames normalized using
-- common.normalize_path function.
function core.project_absolute_path(filename)
if filename:match('^%a:\\') or filename:find('/', 1, true) then
if filename:match('^%a:\\') or filename:find('/', 1, true) == 1 then
return filename
else
return core.project_dir .. PATHSEP .. filename