diff options
author | 2020-02-26 11:17:46 -0500 | |
---|---|---|
committer | 2020-02-26 11:17:46 -0500 | |
commit | 0e07b7478899600805c32564f1b88c1aaedbe16f (patch) | |
tree | 0a0db93a3ba009e06e0cafc700b78cd65fba3e24 /core/file_io.lua | |
parent | a291022fbd9dbc749508917dfa10f40ad0323436 (diff) | |
download | textadept-0e07b7478899600805c32564f1b88c1aaedbe16f.tar.gz textadept-0e07b7478899600805c32564f1b88c1aaedbe16f.zip |
Small code cleanup.
Diffstat (limited to 'core/file_io.lua')
-rw-r--r-- | core/file_io.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index 28773cfa..97977b77 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -359,7 +359,7 @@ local vcs = {'.bzr', '.git', '.hg', '.svn'} -- @name get_project_root function io.get_project_root(path) local lfs_attributes = lfs.attributes - local dir = path or (buffer.filename or lfs.currentdir()):match('^(.+)[/\\]') + local dir = path or (buffer.filename or lfs.currentdir()..'/'):match('^(.+)[/\\]') while dir do for i = 1, #vcs do if lfs_attributes(dir..'/'..vcs[i], 'mode') then return dir end |