diff options
author | Carl Hetherington <carl@carlh.net> | 2012-05-27 15:45:36 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-05-27 15:45:36 +0000 |
commit | 67953dc93b5151d4f25f9883b75d4bb494cd03c5 (patch) | |
tree | 416541db6cac699ea55f0c8bc9f8cc1b0594bc97 /tools/resample_session.pl | |
parent | d7a32eb85e84a2893996435c611ee020c40eb9b1 (diff) |
Patch from antgel to fix resampling of sessions with no
automation/ directory (#4888).
git-svn-id: svn://localhost/ardour2/branches/3.0@12454 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'tools/resample_session.pl')
-rwxr-xr-x | tools/resample_session.pl | 16 |
1 files changed, 9 insertions, 7 deletions
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" ) { |