Skip to content

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

Merged
sumneko merged 1 commit intoLuaLS:masterfrom
sunlin7:patch-1
Jan 20, 2021
Merged

[main.lua] fix empty rootPath cause try "/log" folder#355
sumneko merged 1 commit intoLuaLS:masterfrom
sunlin7:patch-1

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