Index: resample_session.pl
===================================================================
--- resample_session.pl	(revision 12452)
+++ resample_session.pl	(working copy)
@@ -99,15 +99,18 @@
 }
 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);
+# Added wrapper as automation directory not always present
+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" ) {
