From 2df363747bd13e1889026c3e5a6d6c9e1ab955a5 Mon Sep 17 00:00:00 2001 From: ep Date: Thu, 22 Jul 2021 15:32:22 +0700 Subject: [PATCH] fix workspace folders on different drives in Windows --- data/core/common.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/core/common.lua b/data/core/common.lua index 6b9dff7d..0c1cf0e3 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -285,6 +285,12 @@ end function common.relative_path(ref_dir, dir) + if #ref_dir>2 and ref_dir:sub(2,2)==':' + and #dir>2 and dir:sub(2,2)==':' + and ref_dir:sub(1,1)~=dir:sub(1,1) then + -- Windows, different drives, system.absolute_path fails for C:\..\D:\ + return dir + end local ref_ls = split_on_slash(ref_dir) local dir_ls = split_on_slash(dir) local i = 1