]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
remote: remove double Close() on error in WriteTemp()
authorSimon Ruderich <simon@ruderich.org>
Tue, 25 May 2021 06:43:00 +0000 (08:43 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 25 May 2021 06:43:00 +0000 (08:43 +0200)
remote/sync/files.go

index e0a2221009deda9824aa38419fec6ffc1decc0f0..112c9237941a518559b2153dad1276be7a29351f 100644 (file)
@@ -523,7 +523,6 @@ func WriteTemp(dir, base string, data []byte, uid, gid int, mode fs.FileMode) (
        }
        err = fh.Close()
        if err != nil {
-               fh.Close()
                os.Remove(tmpPath)
                return "", err
        }