Merge remote-tracking branch 'dz0ny/patch-1'
[youtube-dl] / youtube_dl / YoutubeDL.py
index bd093add85d225001e887007152fcff77db36fab..a2e3df1f9347e90e7f85d8e0a51de4b77a3d093b 100644 (file)
@@ -717,7 +717,7 @@ class YoutubeDL(object):
                     return
 
         if self.params.get('writeinfojson', False):
-            infofn = filename + u'.info.json'
+            infofn = os.path.splitext(filename)[0] + u'.info.json'
             self.report_writeinfojson(infofn)
             try:
                 json_info_dict = dict((k, v) for k, v in info_dict.items() if not k in ['urlhandle'])