File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -45,20 +45,21 @@ func (s *Server) NewSmbGlobalMapping(context context.Context, request *internal.
4545 isMapped = false
4646 }
4747
48- valid , err := s .fsServer .PathValid (context , remotePath )
49- if err != nil {
50- klog .Errorf ("PathValid(%s) failed with %v" , remotePath , err )
51- return response , fmt .Errorf ("PathValid(%s) failed with %v" , remotePath , err )
52- }
53-
54- if isMapped && ! valid {
55- klog .V (4 ).Infof ("Remote %s is not valid, removing now" , remotePath )
56- err := s .hostAPI .RemoveSmbGlobalMapping (remotePath )
48+ if isMapped {
49+ valid , err := s .fsServer .PathValid (context , remotePath )
5750 if err != nil {
58- klog .Errorf ("RemoveSmbGlobalMapping(%s) failed with %v" , remotePath , err )
59- return response , err
51+ klog .Warningf ("PathValid(%s) failed with %v, ignore error" , remotePath , err )
52+ }
53+
54+ if ! valid {
55+ klog .V (4 ).Infof ("RemotePath %s is not valid, removing now" , remotePath )
56+ err := s .hostAPI .RemoveSmbGlobalMapping (remotePath )
57+ if err != nil {
58+ klog .Errorf ("RemoveSmbGlobalMapping(%s) failed with %v" , remotePath , err )
59+ return response , err
60+ }
61+ isMapped = false
6062 }
61- isMapped = false
6263 }
6364
6465 if ! isMapped {
You can’t perform that action at this time.
0 commit comments