From a80f2e44315319fc3c3cbcaa7d14434ddf755da1 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 25 Sep 2013 12:40:33 +0530 Subject: [PATCH] refactor site_path --- patches/april_2013/p05_update_file_data.py | 2 +- patches/april_2013/p06_update_file_size.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py index 664f9a4a0d..47d6de9186 100644 --- a/patches/april_2013/p05_update_file_data.py +++ b/patches/april_2013/p05_update_file_data.py @@ -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_storage_path(webnotes.conf.files_path, filename)): + if not os.path.exists(webnotes.utils.get_site_path(webnotes.conf.files_path, filename)): exists = False if exists: diff --git a/patches/april_2013/p06_update_file_size.py b/patches/april_2013/p06_update_file_size.py index be8c400915..973cea94d7 100644 --- a/patches/april_2013/p06_update_file_size.py +++ b/patches/april_2013/p06_update_file_size.py @@ -4,7 +4,7 @@ import webnotes, os, webnotes.utils 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 for f in webnotes.conn.sql("""select name, file_name from