French translation update - fixes
[ardour.git] / tools / resample_session.pl
index eadc5369857f9130e16f122916dc11ec7d8d475a..60bb212b62d4ce3f452cb448730deb777fde9ab9 100755 (executable)
@@ -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" ) {