aboutsummaryrefslogtreecommitdiff
path: root/core/file_io.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-02-26 11:17:46 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2020-02-26 11:17:46 -0500
commit0e07b7478899600805c32564f1b88c1aaedbe16f (patch)
tree0a0db93a3ba009e06e0cafc700b78cd65fba3e24 /core/file_io.lua
parenta291022fbd9dbc749508917dfa10f40ad0323436 (diff)
downloadtextadept-0e07b7478899600805c32564f1b88c1aaedbe16f.tar.gz
textadept-0e07b7478899600805c32564f1b88c1aaedbe16f.zip
Small code cleanup.
Diffstat (limited to 'core/file_io.lua')
-rw-r--r--core/file_io.lua2
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