ipn/ipnlocal: log on DeleteFile error

Updates tailscale/corp#1626

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1768/head
Brad Fitzpatrick 4 years ago
parent 6f52fa02a3
commit b03c23d2ed

@ -186,6 +186,10 @@ func (s *peerAPIServer) DeleteFile(baseName string) error {
}
err := os.Remove(path)
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 nil

Loading…
Cancel
Save