Skip to content

Commit

Permalink
Merge pull request #9430 from kdeldycke/batch_file_home_expansion
Browse files Browse the repository at this point in the history
Expand user's home in batch file path.
  • Loading branch information
Sergey M committed May 7, 2016
2 parents a0904c5 + e2eca6f commit d013b26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion youtube_dl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def _real_main(argv=None):
if opts.batchfile == '-':
batchfd = sys.stdin
else:
batchfd = io.open(opts.batchfile, 'r', encoding='utf-8', errors='ignore')
batchfd = io.open(
compat_expanduser(opts.batchfile),
'r', encoding='utf-8', errors='ignore')
batch_urls = read_batch_urls(batchfd)
if opts.verbose:
write_string('[debug] Batch file urls: ' + repr(batch_urls) + '\n')
Expand Down

0 comments on commit d013b26

Please sign in to comment.