소스 검색

Do not try to re-encode unicode filenames (Closes #13)

Philipp Hagemeister 14 년 전
부모
커밋
cec3a53cbd
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      youtube-dl

+ 3 - 3
youtube-dl

@@ -716,7 +716,7 @@ class FileDownloader(object):
 			if dn != '' and not os.path.exists(dn):
 			if dn != '' and not os.path.exists(dn):
 				os.makedirs(dn)
 				os.makedirs(dn)
 		except (OSError, IOError), err:
 		except (OSError, IOError), err:
-			self.trouble(u'ERROR: unable to create directories: %s' % str(err))
+			self.trouble(u'ERROR: unable to create directory ' + unicode(err))
 			return
 			return
 
 
 		if self.params.get('writedescription', False):
 		if self.params.get('writedescription', False):
@@ -729,7 +729,7 @@ class FileDownloader(object):
 				finally:
 				finally:
 					descfile.close()
 					descfile.close()
 			except (OSError, IOError):
 			except (OSError, IOError):
-				self.trouble(u'ERROR: Cannot write description file: %s' % str(descfn))
+				self.trouble(u'ERROR: Cannot write description file ' + descfn)
 				return
 				return
 
 
 		if self.params.get('writeinfojson', False):
 		if self.params.get('writeinfojson', False):
@@ -747,7 +747,7 @@ class FileDownloader(object):
 				finally:
 				finally:
 					infof.close()
 					infof.close()
 			except (OSError, IOError):
 			except (OSError, IOError):
-				self.trouble(u'ERROR: Cannot write metadata to JSON file: %s' % str(infofn))
+				self.trouble(u'ERROR: Cannot write metadata to JSON file ' + infofn)
 				return
 				return
 
 
 		try:
 		try: