aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/file_io.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index d976d84a..820bf70a 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -362,9 +362,7 @@ function io.get_project_root(path)
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') == 'directory' then
- return dir
- end
+ if lfs_attributes(dir..'/'..vcs[i], 'mode') then return dir end
end
dir = dir:match('^(.+)[/\\]')
end