Jelajahi Sumber

Slashes matter

Zachary Kotlarek 13 tahun lalu
induk
melakukan
492df10436
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      encode.pl

+ 2 - 1
encode.pl

@@ -87,6 +87,7 @@ if ($ENV{'AUDIO_BITRATE'}) {
 # Use an alternate output directory, if specified
 # Use an alternate output directory, if specified
 if ($ENV{'OUT_DIR'}) {
 if ($ENV{'OUT_DIR'}) {
 	$OUT_DIR = $ENV{'OUT_DIR'};
 	$OUT_DIR = $ENV{'OUT_DIR'};
+	$OUT_DIR =~ s/\/+$//;
 }
 }
 
 
 # Allow overrides for video height and width. The default is "same as source".
 # Allow overrides for video height and width. The default is "same as source".
@@ -184,7 +185,7 @@ if (!defined($out_file) || length($out_file) < 1) {
 
 
 # Override the output directory, if requested
 # Override the output directory, if requested
 if ($OUT_DIR) {
 if ($OUT_DIR) {
-	$out_file = $OUT_DIR . basename($out_file);
+	$out_file = $OUT_DIR . '/' . basename($out_file);
 }
 }
 
 
 # Keep copies of our defaults so we can reset between tracks
 # Keep copies of our defaults so we can reset between tracks