diff options
author | Arvid Picciani <aep@hereticlinux.org> | 2010-06-29 13:48:35 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-06-29 13:48:35 +0200 |
commit | 704f8c2ccde7a01d5ecc6c13ff5cc1d5f5b09519 (patch) | |
tree | 5c1f86632e73297310bf5403678b525384a61711 /bin/syncqt | |
parent | d3f6e14066219a957f48d24e9f39d3d0c5a61f53 (diff) | |
download | qt4-tools-704f8c2ccde7a01d5ecc6c13ff5cc1d5f5b09519.tar.gz |
syncqt: abort on permission error writing to include/Qt
Merge-request: 707
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-x | bin/syncqt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/syncqt b/bin/syncqt index f499bbca8c..11b1d7210a 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -834,12 +834,12 @@ foreach (@modules_to_sync) { # write forwarding headers to include/Qt if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/) { my $file_name = "$out_basedir/include/Qt/$header"; + my $file_op = '>'; my $header_content = ''; if (exists $colliding_headers{$file_name}) { - $file_name = ">>$file_name"; + $file_op = '>>'; } else { $colliding_headers{$file_name} = 1; - $file_name = ">$file_name"; my $warning_msg = 'Inclusion of header files from include/Qt is deprecated.'; $header_content = "#ifndef QT_NO_QT_INCLUDE_WARN\n" . " #if defined(__GNUC__)\n" . @@ -850,7 +850,7 @@ foreach (@modules_to_sync) { "#endif\n\n"; } $header_content .= '#include "' . "../$lib/$header" . "\"\n"; - open HEADERFILE, $file_name; + open HEADERFILE, $file_op, $file_name or die "unable to open '$file_name' : $!\n"; print HEADERFILE $header_content; close HEADERFILE; } |