[CalendarServer-changes] [6393] CalendarServer/trunk/txdav/common/datastore/util.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 30 12:24:02 PDT 2010


Revision: 6393
          http://trac.macosforge.org/projects/calendarserver/changeset/6393
Author:   sagen at apple.com
Date:     2010-09-30 12:24:00 -0700 (Thu, 30 Sep 2010)
Log Message:
-----------
Only chown if the attachments directory actually exists.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/common/datastore/util.py

Modified: CalendarServer/trunk/txdav/common/datastore/util.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/util.py	2010-09-30 16:00:29 UTC (rev 6392)
+++ CalendarServer/trunk/txdav/common/datastore/util.py	2010-09-30 19:24:00 UTC (rev 6393)
@@ -139,7 +139,9 @@
                 homesPath.remove()
 
         # Set attachment directory ownership
-        if self.sqlAttachmentsPath and (self.uid or self.gid):
+        if (self.sqlAttachmentsPath and
+            self.sqlAttachmentsPath.exists() and
+            (self.uid or self.gid)):
             uid = self.uid or -1
             gid = self.gid or -1
             for fp in self.sqlAttachmentsPath.walk():
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100930/3bcaac85/attachment.html>


More information about the calendarserver-changes mailing list