chore(libreoffice): silence a gosec G703 false positive on temp-file cleanup

This commit is contained in:
Julien Neuhart
2026-08-13 12:28:46 +02:00
parent 05bde96334
commit 9b48d3f84e

View File

@@ -85,7 +85,7 @@ func resetCalcScrollPosition(ctx context.Context, logger *slog.Logger, inputPath
_, err = dst.Write(out)
if err != nil {
_ = os.Remove(dst.Name())
_ = os.Remove(dst.Name()) //nolint:gosec // G703: dst is from os.CreateTemp in the working directory, not a caller-controlled path
logger.WarnContext(ctx, fmt.Sprintf("reset calc scroll position: write sanitized file: %s; using the original file", err))
return inputPath
}