[cas] Clean PathSpec.Path (#352)
* [cas] Clean PathSpec.Path
https://github.com/bazelbuild/remote-apis-sdks/pull/345
removed filepath.Abs call, but it has a side effect that we no longer
clean the path. Clean it explicitly.
diff --git a/go/pkg/cas/upload.go b/go/pkg/cas/upload.go
index 14d84e8..ea3bc58 100644
--- a/go/pkg/cas/upload.go
+++ b/go/pkg/cas/upload.go
@@ -220,6 +220,9 @@
if !filepath.IsAbs(ps.Path) {
return errors.Errorf("%q is not absolute", ps.Path)
}
+ cpy := *ps
+ ps = &cpy
+ ps.Path = filepath.Clean(ps.Path)
// Schedule a file system walk.
u.wgFS.Add(1)