From 3a4da0aa983b7a9bee946a4c55802f7b749d0d2e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 25 May 2021 08:43:00 +0200 Subject: [PATCH] remote: remove double Close() on error in WriteTemp() --- remote/sync/files.go | 1 - 1 file changed, 1 deletion(-) 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 } -- 2.45.2