浏览代码

[fix] convert filenames to unicode, fixes #2510

version-14
Rushabh Mehta 8 年前
父节点
当前提交
fde70fed93
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      frappe/core/doctype/file/file.py

+ 1
- 1
frappe/core/doctype/file/file.py 查看文件

@@ -132,7 +132,7 @@ class File(NestedSet):
if not self.file_name:
self.file_name = self.file_url.split("/files/")[-1]

if not os.path.exists(get_files_path(self.file_name.lstrip("/"))):
if not os.path.exists(get_files_path(frappe.as_unicode(self.file_name.lstrip("/")))):
frappe.throw(_("File {0} does not exist").format(self.file_url), IOError)

def validate_duplicate_entry(self):


正在加载...
取消
保存