]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Merge pull request #9430 from kdeldycke/batch_file_home_expansion
authorSergey M <dstftw@gmail.com>
Sat, 7 May 2016 18:09:51 +0000 (18:09 +0000)
committerSergey M <dstftw@gmail.com>
Sat, 7 May 2016 18:09:51 +0000 (18:09 +0000)
Expand user's home in batch file path.

youtube_dl/__init__.py

index 737f6545d4136401dd3d8ddd691ad52e86894bb0..7a0466077ae1e37682707ec0c29a753741769c85 100644 (file)
@@ -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')