From 98baab9ef829470209fb31d87d04a45c7e302f26 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 25 Jun 2022 00:35:18 +0800 Subject: improve filesync --- xmake/modules/private/service/remote_build/filesync.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xmake/modules/private/service/remote_build/filesync.lua b/xmake/modules/private/service/remote_build/filesync.lua index 4b5c5f250..b828477b4 100644 --- a/xmake/modules/private/service/remote_build/filesync.lua +++ b/xmake/modules/private/service/remote_build/filesync.lua @@ -92,6 +92,11 @@ function filesync:snapshot() for _, filepath in ipairs(os.files(path.join(rootdir, "**" .. ignorefiles))) do local fileitem = path.relative(filepath, rootdir) if fileitem then + -- we should always use '/' in path key for supporting linux & windows + -- https://github.com/xmake-io/xmake/issues/2488 + if is_host("windows") then + fileitem = fileitem:gsub("\\", "/") + end local manifest_info = manifest_old[fileitem] local mtime = os.mtime(filepath) if not manifest_info or not manifest_info.mtime or mtime > manifest_info.mtime then -- cgit v1.3.1