Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main.lua] fix empty rootPath cause try "/log" folder #355

Merged
merged 1 commit into from
Jan 20, 2021

Conversation

sunlin7
Copy link
Contributor

@sunlin7 sunlin7 commented Jan 20, 2021

When run follow command with get error message,

$ bin/Linux/lua-language-server  -E main.lua
bin/Linux/lua-language-server: filesystem error: cannot create directories: Permission denied [/log]

Which is caused by empty ROOT and the folder path for log with be /log in follow line,
https://github.com/sumneko/lua-language-server/blob/1458139721646236406825a03a21152d98753515/main.lua#L40

This change try to assign a default value "." for rootPath to fix the error.

When run follow command with get error message, 
```
$ bin/Linux/lua-language-server  -E main.lua
bin/Linux/lua-language-server: filesystem error: cannot create directories: Permission denied [/log]
```
Which is caused by empty `rootPath' and the folder path for log with be `/log' in follow line,
https://github.com/sumneko/lua-language-server/blob/1458139721646236406825a03a21152d98753515/main.lua#L40

This change try to assign a default value `"."' for `rootPath' will fix the error.
@sumneko sumneko merged commit 2fac237 into LuaLS:master Jan 20, 2021
@sumneko
Copy link
Collaborator

sumneko commented Jan 20, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants