##// END OF EJS Templates
IPython/utils/path.py: Try to use the system encoding, if provided. Otherwise, fallback to `utf8`.
John Kirkham -
Show More
@@ -441,7 +441,7 b' def ensure_dir_exists(path, mode=0o755):'
441 try:
441 try:
442 path_exists = os.path.exists(path)
442 path_exists = os.path.exists(path)
443 except UnicodeEncodeError:
443 except UnicodeEncodeError:
444 path = path.encode("utf8")
444 path = path.encode(sys.getfilesystemencoding() or "utf8")
445 path_exists = os.path.exists(path)
445 path_exists = os.path.exists(path)
446
446
447 if not os.path.exists(path):
447 if not os.path.exists(path):
General Comments 0
You need to be logged in to leave comments. Login now