[strip-nondeterminism] 01/01: png.pm: Don't open the original file in write mode

Mattia Rizzolo mattia at debian.org
Sat Oct 28 22:47:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository strip-nondeterminism.

commit e32fed6025b304f020cdf7b843b06d6833b6ebfc
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sun Oct 29 00:44:54 2017 +0200

    png.pm: Don't open the original file in write mode
    
    Otherwise it dies when dealing with an unwritable (e.g. 444 or 555) file
    that would otherwise be processed perfectly.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 lib/File/StripNondeterminism/handlers/png.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/File/StripNondeterminism/handlers/png.pm b/lib/File/StripNondeterminism/handlers/png.pm
index fc2e827..2d0b4d0 100644
--- a/lib/File/StripNondeterminism/handlers/png.pm
+++ b/lib/File/StripNondeterminism/handlers/png.pm
@@ -57,7 +57,7 @@ sub normalize {
 
 	my $tempfile = File::Temp->new(DIR => dirname($filename));
 
-	open(my $fh, '+<', $filename) or die "$filename: open: $!";
+	open(my $fh, '<', $filename) or die "$filename: open: $!";
 
 	if (_normalize($filename, $fh, $tempfile)) {
 		$tempfile->close;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/strip-nondeterminism.git



More information about the Reproducible-commits mailing list