mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
ipn/ipnlocal: log on DeleteFile error
Updates tailscale/corp#1626 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
6f52fa02a3
commit
b03c23d2ed
@ -186,6 +186,10 @@ func (s *peerAPIServer) DeleteFile(baseName string) error {
|
|||||||
}
|
}
|
||||||
err := os.Remove(path)
|
err := os.Remove(path)
|
||||||
if err != nil && !os.IsNotExist(err) {
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
if pe, ok := err.(*os.PathError); ok {
|
||||||
|
logf := s.b.logf
|
||||||
|
logf("peerapi: failed to DeleteFile: %v", pe.Err) // without filename
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user