fix for new wnf path stuff
This commit is contained in:
parent
0eb811a518
commit
517b30a11d
@ -52,7 +52,7 @@ def update_for_doc(doctype, doc):
|
||||
|
||||
exists = True
|
||||
if not (filename.startswith("http://") or filename.startswith("https://")):
|
||||
if not os.path.exists(webnotes.utils.get_path("public", "files", filename)):
|
||||
if not os.path.exists(webnotes.utils.get_storage_path(webnotes.conf.files_path, filename)):
|
||||
exists = False
|
||||
|
||||
if exists:
|
||||
|
@ -4,7 +4,7 @@
|
||||
import webnotes, os, webnotes.utils
|
||||
|
||||
def execute():
|
||||
files_path = webnotes.utils.get_path("public", "files")
|
||||
files_path = webnotes.utils.get_storage_path(webnotes.conf.files_path)
|
||||
webnotes.conn.auto_commit_on_many_writes = 1
|
||||
|
||||
for f in webnotes.conn.sql("""select name, file_name from
|
||||
@ -14,4 +14,4 @@ def execute():
|
||||
if os.path.exists(filepath):
|
||||
webnotes.conn.set_value("File Data", f.name, "file_size", os.stat(filepath).st_size)
|
||||
|
||||
webnotes.conn.auto_commit_on_many_writes = 0
|
||||
webnotes.conn.auto_commit_on_many_writes = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user