commit:ae12d54eb3dab43088b07c71c003a9ea076eb30c
author:Chip Black
committer:Chip Black
date:Thu Aug 28 16:41:17 2008 -0500
parents:60b835ccf03be20cd9aa879882c43c58006f00f0
Fixed residual file extension for processed files
diff --git a/upod.pl b/upod.pl
line changes: +6/-0
index 9707b23..72821e1
--- a/upod.pl
+++ b/upod.pl
@@ -104,6 +104,12 @@ LIST: {
 
 		if ($proc) {
 			if ($residual) {
+				# If the residual has been processed,
+				# its new $outfile will have the wrong
+				# extension
+				$residual =~ /(\.\w+)$/;
+				my $residual_extension = $1;
+				$outfile =~ s/\.\w+$/$residual_extension/;
 				move $residual, $outfile;
 				undef $residual;
 			} else {