summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/workspace/workspace.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index cfc94012..f96d88eb 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -304,7 +304,12 @@ function m.getRelativePath(uri)
if not m.path then
return m.normalize(path)
end
- local _, pos = m.normalize(path):lower():find(m.path:lower(), 1, true)
+ local _, pos
+ if platform.OS == 'Windows' then
+ _, pos = m.normalize(path):lower():find(m.path:lower(), 1, true)
+ else
+ _, pos = m.normalize(path):find(m.path, 1, true)
+ end
if pos then
return m.normalize(path:sub(pos + 1))
else