$OpenBSD: patch-kde-dev-scripts_qt4_convert-qiodevice_at_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-qiodevice_at.pl.orig	Fri Jun 28 22:03:13 2013
+++ kde-dev-scripts/qt4/convert-qiodevice_at.pl	Fri Jul  5 18:14:32 2013
@@ -26,7 +26,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![\.>]at\s*\(! ) {
@@ -42,7 +42,7 @@ foreach my $file (@ARGV) {
 
     if ($modified) {
       print "Modified: $file\n";
-      open (my $OUT, ">$file");
+      open (my $OUT, ">", $file);
       print $OUT @l;
       close $OUT;
     }
