Fixed bug in not removing original video files when we should have
authorAlan J. Pippin <alan@pippins.net>
Fri, 5 Aug 2016 05:34:25 +0000 (23:34 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Fri, 5 Aug 2016 05:34:34 +0000 (23:34 -0600)
merge_videos_by_day

index 42744fe3b1de5318e301b56f47f78f0d6e780407..27f2e2bbd7fed6673ae9f2e441ac85f9fe79eca6 100755 (executable)
@@ -194,7 +194,7 @@ foreach $ext (sort keys %videos) {
            print "$cmd\n";
            if(!defined $opt_k) { 
                foreach $video (@{$videos{$ext}{$video}}) {
-                   if(($save_originals) && ($video =~ /\.$originals_file_ext$/)) {
+                   if(($save_originals) && ($video =~ /\.$originals_file_ext/)) {
                        print "-> Saving the original video $video\n";
                        print("mv $video \"$origpathname/".basename(dirname($video))."_".basename($video)."\n");
                    } else {
@@ -216,7 +216,7 @@ foreach $ext (sort keys %videos) {
            # Remove the individual video files
            if(!defined $opt_k) { 
                foreach $srcvideo (@{$videos{$ext}{$video}}) {
-                   if(($save_originals) && ($srcvideo =~ /\.$originals_file_ext$/)) {
+                   if(($save_originals) && ($srcvideo =~ /\.$originals_file_ext/)) {
                        print "-> Saving the original video $srcvideo to $origpathname\n";
                        system("mv $srcvideo \"$origpathname/".basename(dirname($srcvideo))."_".basename($srcvideo));
                    } else {