[fix] [file manager] unicode issue in get_file_name()
This commit is contained in:
parent
5d0ab13266
commit
da9bbf8f09
1 changed files with 1 additions and 1 deletions
|
|
@ -251,7 +251,7 @@ def get_content_hash(content):
|
|||
|
||||
def get_file_name(fname, optional_suffix):
|
||||
n_records = frappe.db.sql("select name from `tabFile Data` where file_name=%s", fname)
|
||||
if len(n_records) > 0 or os.path.exists(get_files_path(fname.encode('utf-8'))):
|
||||
if len(n_records) > 0 or os.path.exists(get_files_path(fname).encode('utf-8')):
|
||||
f = fname.rsplit('.', 1)
|
||||
if len(f) == 1:
|
||||
partial, extn = f[0], ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue