浏览代码

[xattr] Enhanced error messages on Windows

Yen Chi Hsuan 10 年之前
父节点
当前提交
c827d4cfdb
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      youtube_dl/postprocessor/xattrpp.py

+ 6 - 3
youtube_dl/postprocessor/xattrpp.py

@@ -167,7 +167,10 @@ class XAttrMetadataPP(PostProcessor):
                 self._downloader.report_warning(
                 self._downloader.report_warning(
                     'Unable to write extended attributes due to too long values.')
                     'Unable to write extended attributes due to too long values.')
             else:
             else:
-                self._downloader.report_error(
-                    'This filesystem doesn\'t support extended attributes. ' +
-                    '(You may have to enable them in your /etc/fstab)')
+                msg = 'This filesystem doesn\'t support extended attributes. '
+                if os.name == 'nt':
+                    msg += 'You need to use NTFS.'
+                else:
+                    msg += '(You may have to enable them in your /etc/fstab)'
+                self._downloader.report_error(msg)
             return [], info
             return [], info