upgrade_repo_v2: Use atomic replace for supported backends
This commit is contained in:
parent
7559d2f105
commit
e36a40db10
13 changed files with 82 additions and 17 deletions
|
@ -267,6 +267,12 @@ func (r *SFTP) Hasher() hash.Hash {
|
|||
return nil
|
||||
}
|
||||
|
||||
// HasAtomicReplace returns whether Save() can atomically replace files
|
||||
func (r *SFTP) HasAtomicReplace() bool {
|
||||
// we use sftp's 'Rename()' in 'Save()' which does not allow overwriting
|
||||
return false
|
||||
}
|
||||
|
||||
// Join joins the given paths and cleans them afterwards. This always uses
|
||||
// forward slashes, which is required by sftp.
|
||||
func Join(parts ...string) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue