[CalendarServer-changes] [1196] CalendarServer/branches/users/cdaboo/sqlprops-1126/twistedcaldav/ static.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Feb 16 13:41:49 PST 2007


Revision: 1196
          http://trac.macosforge.org/projects/calendarserver/changeset/1196
Author:   cdaboo at apple.com
Date:     2007-02-16 13:41:49 -0800 (Fri, 16 Feb 2007)

Log Message:
-----------
Need to ignore new database file in directory listings etc.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/sqlprops-1126/twistedcaldav/static.py

Modified: CalendarServer/branches/users/cdaboo/sqlprops-1126/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/cdaboo/sqlprops-1126/twistedcaldav/static.py	2007-02-16 19:00:45 UTC (rev 1195)
+++ CalendarServer/branches/users/cdaboo/sqlprops-1126/twistedcaldav/static.py	2007-02-16 21:41:49 UTC (rev 1196)
@@ -61,7 +61,7 @@
 from twistedcaldav.notifications import NotificationsCollectionResource, NotificationResource
 from twistedcaldav.resource import CalDAVResource, isCalendarCollectionResource, isPseudoCalendarCollectionResource
 from twistedcaldav.schedule import ScheduleInboxResource, ScheduleOutboxResource
-from twistedcaldav.sqlprops import sqlPropertyStore
+from twistedcaldav.sqlprops import sqlPropertyStore, SQLPropertiesDatabase
 from twistedcaldav.dropbox import DropBoxHomeResource, DropBoxCollectionResource, DropBoxChildResource
 from twistedcaldav.directory.calendar import DirectoryCalendarHomeProvisioningResource
 from twistedcaldav.directory.calendar import DirectoryCalendarHomeTypeProvisioningResource
@@ -72,6 +72,10 @@
     """
     CalDAV-accessible L{DAVFile} resource.
     """
+
+    db_names = (db_basename, SQLPropertiesDatabase.dbFilename)
+
+
     def __repr__(self):
         if self.isCalendarCollection():
             return "<%s (calendar collection): %s>" % (self.__class__.__name__, self.fp.path)
@@ -270,7 +274,7 @@
     def listChildren(self):
         return [
             child for child in super(CalDAVFile, self).listChildren()
-            if child != db_basename
+            if child not in CalDAVFile.db_names
         ]
 
     ##
@@ -298,7 +302,7 @@
                 for f in top.listdir():
     
                     # Ignore the database
-                    if top_level and f == db_basename:
+                    if top_level and f in CalDAVFile.db_names:
                         continue
     
                     child = top.child(f)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070216/1aaba6dd/attachment.html


More information about the calendarserver-changes mailing list