file_manager bug
This commit is contained in:
parent
c79f36af73
commit
25add33914
1 changed files with 3 additions and 3 deletions
|
|
@ -221,20 +221,20 @@ def delete_file(fname, verbose=0):
|
|||
|
||||
def get_file(fname):
|
||||
"""deprecated"""
|
||||
in_fname = fname
|
||||
|
||||
f = get_file_system_name(fname)
|
||||
if f:
|
||||
file_id = f[0][0].replace('/','-')
|
||||
file_name = f[0][1]
|
||||
else:
|
||||
file_id = fname
|
||||
file_name = fname
|
||||
|
||||
# read the file
|
||||
import os
|
||||
with open(os.path.join(webnotes.get_files_path(), file_id), 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
return [f[1], content]
|
||||
return [file_name, content]
|
||||
|
||||
# Conversion Patch
|
||||
# -------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue