lua-language-server
                                
                                 lua-language-server copied to clipboard
                                
                                    lua-language-server copied to clipboard
                            
                            
                            
                        Trailing slash for rootUri will duplicate folder name
How are you using the lua-language-server?
Other
Which OS are you using?
Windows
What is the issue affecting?
Other
Expected Behaviour
No folder name duplication
Actual Behaviour
If a LS client send a rootUri with a trailing slash the last folder name is duplicated to get the "workspace path".
I already filed a bug for Apache Netbeans (https://github.com/apache/netbeans/issues/7166), but why is LuaLS duplicating the folder's name?
Reproduction steps
see description in https://github.com/apache/netbeans/issues/7166
Additional Notes
No response
Log File
No response
As a workaround for us we removed any trailing slash from the rootUri in provider.lua
    m.register 'initialize' {
        function(params)
            if params.rootUri and params.rootUri:sub(#params.rootUri) == '/' then
                params.rootUri = params.rootUri:sub(1, -2)
            end
            client.init(params)
but this (I think) just removes the symptom not the cause