소스 검색

Only truncate names with non-whitespace after the \n

Zachary Kotlarek 9 년 전
부모
커밋
5bda29d850
1개의 변경된 파일과 3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      yt/subscribe.pl

+ 3 - 1
yt/subscribe.pl

@@ -436,7 +436,9 @@ FETCH_LOOP: foreach my $id (keys(%{$videos})) {
 					warn('Error executing youtube-dl for name: ' . $NAME . '/' . $id . ' (' . $EXITVAL . ")\n");
 					next FETCH_LOOP;
 				}
-				$file =~ s/^.*\n//;
+				if ($file =~ /\n\S/) {
+					$file =~ s/^.*\n//;
+				}
 				$file =~ s/^\s+//;
 				$file =~ s/\s+$//;