diff --git a/pointer/smudge.go b/pointer/smudge.go
index <HASH>..<HASH> 100644
--- a/pointer/smudge.go
+++ b/pointer/smudge.go
@@ -49,7 +49,7 @@ func downloadFile(writer io.Writer, ptr *Pointer, mediafile string, cb gitmedia.
 	}
 
 	_, err = gitmedia.CopyWithCallback(mediaFile, reader, ptr.Size, cb)
-	if err != nil {
+	if err == nil {
 		err = mediaFile.Accept()
 	}
 	closeErr := mediaFile.Close()
Fix reversed logic in error handling, call Accept