Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
When a resource is directly accessed rathre than accessed via locateR…
Browse files Browse the repository at this point in the history
…esource, it is possible that the

parents have not been provisioned. So provision any parents if they are missing.

git-svn-id: https://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk@2229 e27351fd-9f3e-4f54-a53b-843176b1656c
  • Loading branch information
cyrusdaboo committed Mar 17, 2008
1 parent 066b4bc commit 17307e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions twistedcaldav/static.py
Expand Up @@ -411,6 +411,9 @@ def provisionFile(self):

if hasattr(self, "parent"):
parent = self.parent
if not parent.exists() and isinstance(parent, AutoProvisioningFileMixIn):
parent.provision()

assert parent.exists(), "Parent %s of %s does not exist" % (parent, self)
assert parent.isCollection(), "Parent %s of %s is not a collection" % (parent, self)

Expand Down

0 comments on commit 17307e1

Please sign in to comment.