[CalendarServer-changes] [7609] CalendarServer/branches/users/glyph/quota/txdav/caldav/datastore/sql .py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jun 20 11:42:45 PDT 2011
Revision: 7609
http://trac.macosforge.org/projects/calendarserver/changeset/7609
Author: glyph at apple.com
Date: 2011-06-20 11:42:45 -0700 (Mon, 20 Jun 2011)
Log Message:
-----------
now if only 'home' were defined
Modified Paths:
--------------
CalendarServer/branches/users/glyph/quota/txdav/caldav/datastore/sql.py
Modified: CalendarServer/branches/users/glyph/quota/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/quota/txdav/caldav/datastore/sql.py 2011-06-20 18:42:34 UTC (rev 7608)
+++ CalendarServer/branches/users/glyph/quota/txdav/caldav/datastore/sql.py 2011-06-20 18:42:45 UTC (rev 7609)
@@ -69,6 +69,7 @@
from txdav.caldav.datastore.util import CalendarObjectBase
from txdav.caldav.icalendarstore import IAttachmentStorageTransport
+from txdav.caldav.icalendarstore import QuotaExceeded
from txdav.common.icommondatastore import IndexedSearchException
from pycalendar.datetime import PyCalendarDateTime
@@ -761,6 +762,10 @@
old_size = self.attachment.size()
+ if home.quotaAllowedBytes() - (home.quotaUsedBytes() +
+ self.attachment.size()):
+ raise QuotaExceeded()
+
self.attachment._path.setContent(self.buf)
self.attachment._contentType = self.contentType
self.attachment._md5 = self.hash.hexdigest()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110620/8c54814e/attachment.html>
More information about the calendarserver-changes
mailing list