$OpenBSD: patch-kde-dev-scripts_qt4_convert-find-to-indexof_pl,v 1.2 2013/07/05 14:32:50 zhuk Exp $
Cleanup development scripts, making them more portable and secure.
Upstream review 110858: http://git.reviewboard.kde.org/r/110858/
--- kde-dev-scripts/qt4/convert-find-to-indexof.pl.orig	Fri Jun 28 22:03:13 2013
+++ kde-dev-scripts/qt4/convert-find-to-indexof.pl	Fri Jul  5 18:14:32 2013
@@ -28,7 +28,7 @@ foreach my $file (@ARGV) {
 
     my $modified;
     my @necessaryIncludes = ();
-    open(my $FILE, $file) or warn "We can't open file $file:$!\n";
+    open(my $FILE, "<", $file) or warn "We can't open file $file:$!\n";
     my @l = map {
       my $orig = $_;
       if ( m![\.>]find\s*\(! ) {
@@ -64,7 +64,7 @@ foreach my $file (@ARGV) {
 
     if ($modified) {
       print "Modified: $file\n";
-      open (my $OUT, ">$file");
+      open (my $OUT, ">", $file);
       print $OUT @l;
       close $OUT;
     }
