View Issue Details

IDProjectCategoryView StatusLast Update
0004888ardourbugspublic2020-04-19 20:16
Reporterantgel Assigned Tocth103  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0004888: [PATCH] resample_session.pl assumes existence of automation/ directory
DescriptionAs per summary. In my experience, not all sessions have an automation/ directory. I've attached a diff of my (trivial) patch.
TagsNo tags attached.

Activities

2012-05-27 11:03

 

resample_session.pl.diff (1,147 bytes)   
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" ) {
resample_session.pl.diff (1,147 bytes)   

cth103

2012-05-27 15:46

administrator   ~0013300

Applied to SVN 12454. Thanks!

system

2020-04-19 20:16

developer   ~0023061

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2012-05-27 11:03 antgel New Issue
2012-05-27 11:03 antgel File Added: resample_session.pl.diff
2012-05-27 15:46 cth103 cost => 0.00
2012-05-27 15:46 cth103 Note Added: 0013300
2012-05-27 15:46 cth103 Status new => resolved
2012-05-27 15:46 cth103 Resolution open => fixed
2012-05-27 15:46 cth103 Assigned To => cth103
2020-04-19 20:16 system Note Added: 0023061
2020-04-19 20:16 system Status resolved => closed