From d184e1401806b6ff3f3aebf3eb323a089c127ccc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bartek=20G=C3=B3rny?= <bartek@gorny.edu.pl>
Date: Wed, 11 Oct 2006 10:52:23 +0000
Subject: [PATCH] webdav fix, by Ivan (part I)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10652 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5OOo/Document/DMSFile.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/product/ERP5OOo/Document/DMSFile.py b/product/ERP5OOo/Document/DMSFile.py
index 1ec9c0c309..80b671fa80 100644
--- a/product/ERP5OOo/Document/DMSFile.py
+++ b/product/ERP5OOo/Document/DMSFile.py
@@ -174,6 +174,15 @@ class DMSFile(XMLObject,File):
     searchable_text = ' '.join(map(lambda x: self.getProperty(x) or ' ',self.searchable_attrs))
     return searchable_text
 
+  def get_size(self):
+    '''
+    has to be overwritted here, otherwise WebDAV fails
+    '''
+    try:
+      return len(self.data)
+    except AttributeError:
+      return 0
+
   security.declareProtected(Permissions.View,'hasFile')
   def hasFile(self):
     """
-- 
2.30.9