瀏覽代碼

append unix-style relative path when computing container target path

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 1 年之前
父節點
當前提交
d2b9456137
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/compose/watch.go

+ 1 - 1
pkg/compose/watch.go

@@ -294,7 +294,7 @@ func maybeFileEvent(trigger types.Trigger, hostPath string, ignore watch.PathMat
 			return nil
 		}
 		// always use Unix-style paths for inside the container
-		containerPath = path.Join(trigger.Target, rel)
+		containerPath = path.Join(trigger.Target, filepath.ToSlash(rel))
 	}
 
 	return &fileEvent{