mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +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)
|
||||
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…
Reference in New Issue
Block a user