mirror of
https://github.com/restic/restic.git
synced 2025-12-29 05:26:27 +00:00
Add nil-receiver awareness to all Reader/Writer
This commit is contained in:
@@ -17,6 +17,10 @@ type encryptWriter struct {
|
||||
}
|
||||
|
||||
func (e *encryptWriter) Close() error {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if e.closed {
|
||||
return errors.New("Close() called on already closed writer")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user