|
|
@@ -175,7 +175,7 @@ if ($ENV{'HANDBRAKE_ARGS'}) {
|
|
|
|
|
|
# Command-line parameters
|
|
|
my ($in_file, $out_file, $title) = @ARGV;
|
|
|
-if (!defined($in_file) || length($in_file) < 1 || !-r $in_file) {
|
|
|
+if (!defined($in_file) || length($in_file) < 1 || !-f $in_file) {
|
|
|
die('Usage: ' . basename($0) . " in_file [out_file] [title]\n");
|
|
|
}
|
|
|
|
|
|
@@ -194,10 +194,10 @@ my %titles = &scan($in_file);
|
|
|
if (scalar(keys(%titles)) == 1) {
|
|
|
my $srt_file = $in_file;
|
|
|
$srt_file =~ s/\.\w{2,4}$/.srt/;
|
|
|
- if (!-r $srt_file) {
|
|
|
+ if (!-f $srt_file) {
|
|
|
$srt_file =~ s/\.\w{2,4}$/.ssa/;
|
|
|
}
|
|
|
- if (-r $srt_file) {
|
|
|
+ if (-f $srt_file) {
|
|
|
if ($DEBUG) {
|
|
|
print STDERR 'Adding subtitles from: ' . $srt_file . "\n";
|
|
|
}
|