mirror of
https://github.com/restic/restic.git
synced 2025-10-09 23:14:08 +00:00
local/sftp: Remove unneeded stat() call
This commit is contained in:
@@ -149,13 +149,7 @@ func (b *Local) Save(ctx context.Context, h restic.Handle, rd io.Reader) (err er
|
||||
return errors.Wrap(err, "Close")
|
||||
}
|
||||
|
||||
// set mode to read-only
|
||||
fi, err := fs.Stat(filename)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Stat")
|
||||
}
|
||||
|
||||
return setNewFileMode(filename, fi)
|
||||
return setNewFileMode(filename, backend.Modes.File)
|
||||
}
|
||||
|
||||
// Load returns a reader that yields the contents of the file at h at the
|
||||
|
Reference in New Issue
Block a user