瀏覽代碼

Use -f instead of -r; the permissions check does not work for ACLs

Zach Isbach 10 月之前
父節點
當前提交
400be59f81
共有 2 個文件被更改,包括 4 次插入 和 4 次删除
  1. 3 3
      encode.pl
  2. 1 1
      movInfo.pl

+ 3 - 3
encode.pl

@@ -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";
 		}

+ 1 - 1
movInfo.pl

@@ -13,7 +13,7 @@ my $MAX_AUDIO = 10;
 
 # Command line parameters
 my ($infile, $MODE) = @ARGV;
-if (!-r $infile) {
+if (!-f $infile) {
 	die('Usage: ' . basename($0) . "input_file [mode]\n");
 }
 if ($MODE) {