Removing un-used variables and fixing an error condition (#4737)
This commit is contained in:
+1
-1
@@ -881,7 +881,7 @@ func (f *fsClient) listInRoutine(contentCh chan<- *ClientContent) {
|
||||
switch fst.Mode().IsDir() {
|
||||
case true:
|
||||
files, e := readDir(fpath)
|
||||
if err != nil {
|
||||
if e != nil {
|
||||
contentCh <- &ClientContent{Err: probe.NewError(e)}
|
||||
return
|
||||
}
|
||||
|
||||
+2
-2
@@ -285,7 +285,7 @@ func prepareCopyURLsTypeD(ctx context.Context, cc copyURLsContent, o prepareCopy
|
||||
}
|
||||
}(ctx, cc, o)
|
||||
|
||||
go func(ctx context.Context, cc copyURLsContent, o prepareCopyURLsOpts) {
|
||||
go func() {
|
||||
defer close(copyURLsCh)
|
||||
filter := make(map[string]struct{})
|
||||
for cpURLs := range copyURLsFilterCh {
|
||||
@@ -301,7 +301,7 @@ func prepareCopyURLsTypeD(ctx context.Context, cc copyURLsContent, o prepareCopy
|
||||
copyURLsCh <- cpURLs
|
||||
}
|
||||
}
|
||||
}(ctx, cc, o)
|
||||
}()
|
||||
|
||||
return copyURLsCh
|
||||
}
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ func promptTrustSelfSignedCert(ctx context.Context, endpoint, alias string) (*x5
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if te != nil && !strings.Contains(te.Error(), "certificate signed by unknown authority") &&
|
||||
if !strings.Contains(te.Error(), "certificate signed by unknown authority") &&
|
||||
!strings.Contains(te.Error(), "certificate is not trusted") /* darwin specific error message */ {
|
||||
return nil, probe.NewError(te)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user