@@ -174,7 +174,7 @@ func (s *BrowserService) getBBClientdBlobPath(blobDigest digest.Digest, blobType
174
174
// pasted into a shell. It assumes that bb_clientd's FUSE file system is
175
175
// mounted at ~/bb_clientd, the default.
176
176
func formatBBClientdPath (p * path.Trace ) string {
177
- return "~/bb_clientd/cas/" + shellquote .Join (p .String ())
177
+ return "~/bb_clientd/cas/" + shellquote .Join (p .GetUNIXString ())
178
178
}
179
179
180
180
func (s * BrowserService ) handleWelcome (w http.ResponseWriter , req * http.Request ) {
@@ -548,13 +548,13 @@ func (s *BrowserService) generateTarballDirectory(ctx context.Context, w *tar.Wr
548
548
for _ , directoryNode := range directory .Directories {
549
549
childName , ok := path .NewComponent (directoryNode .Name )
550
550
if ! ok {
551
- return status .Errorf (codes .InvalidArgument , "Directory %#v in directory %#v has an invalid name" , directoryNode .Name , directoryPath .String ())
551
+ return status .Errorf (codes .InvalidArgument , "Directory %#v in directory %#v has an invalid name" , directoryNode .Name , directoryPath .GetUNIXString ())
552
552
}
553
553
childPath := directoryPath .Append (childName )
554
554
555
555
if err := w .WriteHeader (& tar.Header {
556
556
Typeflag : tar .TypeDir ,
557
- Name : childPath .String (),
557
+ Name : childPath .GetUNIXString (),
558
558
Mode : 0o777 ,
559
559
}); err != nil {
560
560
return err
@@ -576,13 +576,13 @@ func (s *BrowserService) generateTarballDirectory(ctx context.Context, w *tar.Wr
576
576
for _ , symlinkNode := range directory .Symlinks {
577
577
childName , ok := path .NewComponent (symlinkNode .Name )
578
578
if ! ok {
579
- return status .Errorf (codes .InvalidArgument , "Symbolic link %#v in directory %#v has an invalid name" , symlinkNode .Name , directoryPath .String ())
579
+ return status .Errorf (codes .InvalidArgument , "Symbolic link %#v in directory %#v has an invalid name" , symlinkNode .Name , directoryPath .GetUNIXString ())
580
580
}
581
581
childPath := directoryPath .Append (childName )
582
582
583
583
if err := w .WriteHeader (& tar.Header {
584
584
Typeflag : tar .TypeSymlink ,
585
- Name : childPath .String (),
585
+ Name : childPath .GetUNIXString (),
586
586
Linkname : symlinkNode .Target ,
587
587
Mode : 0o777 ,
588
588
}); err != nil {
@@ -594,10 +594,10 @@ func (s *BrowserService) generateTarballDirectory(ctx context.Context, w *tar.Wr
594
594
for _ , fileNode := range directory .Files {
595
595
childName , ok := path .NewComponent (fileNode .Name )
596
596
if ! ok {
597
- return status .Errorf (codes .InvalidArgument , "File %#v in directory %#v has an invalid name" , fileNode .Name , directoryPath .String ())
597
+ return status .Errorf (codes .InvalidArgument , "File %#v in directory %#v has an invalid name" , fileNode .Name , directoryPath .GetUNIXString ())
598
598
}
599
599
childPath := directoryPath .Append (childName )
600
- childPathString := childPath .String ()
600
+ childPathString := childPath .GetUNIXString ()
601
601
602
602
childDigest , err := digestFunction .NewDigestFromProto (fileNode .Digest )
603
603
if err != nil {
@@ -967,7 +967,7 @@ func (s *BrowserService) handleTree(w http.ResponseWriter, req *http.Request) {
967
967
bbClientdPath := s .getBBClientdBlobPath (treeDigest , treeDirectoryComponent )
968
968
directoryDigest := treeDigest
969
969
rootDirectory , scopeWalker := path .EmptyBuilder .Join (path .VoidScopeWalker )
970
- rootDirectoryWalker , _ := scopeWalker .OnScope ( false )
970
+ rootDirectoryWalker , _ := scopeWalker .OnRelative ( )
971
971
for _ , component := range strings .FieldsFunc (
972
972
mux .Vars (req )["subdirectory" ],
973
973
func (r rune ) bool { return r == '/' }) {
@@ -1008,7 +1008,7 @@ func (s *BrowserService) handleTree(w http.ResponseWriter, req *http.Request) {
1008
1008
treeInfo .Directory = childDirectory
1009
1009
}
1010
1010
treeInfo .BBClientdPath = formatBBClientdPath (bbClientdPath )
1011
- treeInfo .RootDirectory = rootDirectory .String ()
1011
+ treeInfo .RootDirectory = rootDirectory .GetUNIXString ()
1012
1012
1013
1013
if req .URL .Query ().Get ("format" ) == "tar" {
1014
1014
s .generateTarball (
0 commit comments