fix for new wnf path stuff
diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py
index e03abc6..664f9a4 100644
--- a/patches/april_2013/p05_update_file_data.py
+++ b/patches/april_2013/p05_update_file_data.py
@@ -52,7 +52,7 @@
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:
diff --git a/patches/april_2013/p06_update_file_size.py b/patches/april_2013/p06_update_file_size.py
index 6879625..be8c400 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_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 @@
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
\ No newline at end of file
+ webnotes.conn.auto_commit_on_many_writes = 0