X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=tools%2Fresample_session.pl;h=60bb212b62d4ce3f452cb448730deb777fde9ab9;hb=d3bb4e8b08ac3bc80013bce1a82eeae2ea53eea1;hp=eadc5369857f9130e16f122916dc11ec7d8d475a;hpb=bc89fe0147c04b67141936d109c00dfd4d69cc4b;p=ardour.git diff --git a/tools/resample_session.pl b/tools/resample_session.pl index eadc536985..60bb212b62 100755 --- a/tools/resample_session.pl +++ b/tools/resample_session.pl @@ -99,15 +99,17 @@ while ( my $file=readdir(DOT_ARDOUR) ) { } close(DOT_ARDOUR); -# Read the names of all automation files in /automation/ -opendir(AUTOMATION,$sourceDirectory."/automation/") || die ($sourceDirectory."/automation: could not open!"); -while ( my $file=readdir(AUTOMATION) ) { - if ( -f $sourceDirectory."/automation/".$file && - index($file,".automation") eq (length($file)-11)) { - push(@automation,$file); +if ( -d $sourceDirectory."/automation/") { + # Read the names of all automation files in /automation/ + opendir(AUTOMATION,$sourceDirectory."/automation/") || die ($sourceDirectory."/automation: could not open!"); + while ( my $file=readdir(AUTOMATION) ) { + if ( -f $sourceDirectory."/automation/".$file && + index($file,".automation") eq (length($file)-11)) { + push(@automation,$file); + } } + close(AUTOMATION); } -close(AUTOMATION); # Check for /peaks/ if ( ! -d $sourceDirectory."/peaks" ) {