Bug 13893: [QA Follow-up] Move print statement, sort files in loop
Just moving the print statement for DEV updates to show them too for the new perl format. In the loop opendir..readdir is used; this might not be always in the expected order. I added a sort to force the order. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
74e5f64fd7
commit
e38b21fa39
1 changed files with 4 additions and 3 deletions
|
@ -10307,9 +10307,10 @@ if ( CheckVersion($DBversion) ) {
|
|||
|
||||
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';
|
||||
opendir( my $dirh, $update_dir );
|
||||
while ( my $file = readdir $dirh ) {
|
||||
if ( $file =~ /\.sql$/ ) { # skip non SQL files
|
||||
print "DEV atomic update : $file \n";
|
||||
foreach my $file ( sort readdir $dirh ) {
|
||||
next if $file !~ /\.(sql|perl)$/; #skip other files
|
||||
print "DEV atomic update: $file\n";
|
||||
if ( $file =~ /\.sql$/ ) {
|
||||
my $installer = C4::Installer->new();
|
||||
my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1;
|
||||
} elsif ( $file =~ /\.perl$/ ) {
|
||||
|
|
Loading…
Reference in a new issue