From: Simon Ruderich Date: Tue, 25 May 2021 06:43:00 +0000 (+0200) Subject: remote: remove double Close() on error in WriteTemp() X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=3a4da0aa983b7a9bee946a4c55802f7b749d0d2e;p=safcm%2Fsafcm.git remote: remove double Close() on error in WriteTemp() --- diff --git a/remote/sync/files.go b/remote/sync/files.go index e0a2221..112c923 100644 --- a/remote/sync/files.go +++ b/remote/sync/files.go @@ -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 }