mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-26 22:24:59 +08:00
Fix fast path in atomicSymlink
This commit is contained in:
parent
f214c1b76c
commit
0f4744b5a9
1 changed files with 1 additions and 1 deletions
|
|
@ -730,7 +730,7 @@ func atomicSymlink(oldname, newname string) error {
|
|||
// Fast path: if newname does not exist yet, we can skip the whole dance
|
||||
// below.
|
||||
if err := os.Symlink(oldname, newname); err == nil || !os.IsExist(err) {
|
||||
return fmt.Errorf("cannot create symlink %s: %w", newname, err)
|
||||
return err
|
||||
}
|
||||
|
||||
// We need to use ioutil.TempDir, as we cannot overwrite a ioutil.TempFile,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue