refactor site_path
This commit is contained in:
parent
abf62eacca
commit
a80f2e4431
@ -52,7 +52,7 @@ def update_for_doc(doctype, doc):
|
|||||||
|
|
||||||
exists = True
|
exists = True
|
||||||
if not (filename.startswith("http://") or filename.startswith("https://")):
|
if not (filename.startswith("http://") or filename.startswith("https://")):
|
||||||
if not os.path.exists(webnotes.utils.get_storage_path(webnotes.conf.files_path, filename)):
|
if not os.path.exists(webnotes.utils.get_site_path(webnotes.conf.files_path, filename)):
|
||||||
exists = False
|
exists = False
|
||||||
|
|
||||||
if exists:
|
if exists:
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import webnotes, os, webnotes.utils
|
import webnotes, os, webnotes.utils
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
files_path = webnotes.utils.get_storage_path(webnotes.conf.files_path)
|
files_path = webnotes.utils.get_site_path(webnotes.conf.files_path)
|
||||||
webnotes.conn.auto_commit_on_many_writes = 1
|
webnotes.conn.auto_commit_on_many_writes = 1
|
||||||
|
|
||||||
for f in webnotes.conn.sql("""select name, file_name from
|
for f in webnotes.conn.sql("""select name, file_name from
|
||||||
|
Loading…
x
Reference in New Issue
Block a user