From 0e07b7478899600805c32564f1b88c1aaedbe16f Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 26 Feb 2020 11:17:46 -0500 Subject: Small code cleanup. --- core/file_io.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/file_io.lua') 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 -- cgit v1.2.3