|
|
|
|
24
|
from tracim.lib.webdav.design import designThread, designPage
|
24
|
from tracim.lib.webdav.design import designThread, designPage
|
25
|
|
25
|
|
26
|
from wsgidav import compat
|
26
|
from wsgidav import compat
|
27
|
-from wsgidav.dav_error import DAVError, HTTP_FORBIDDEN
|
|
|
|
|
27
|
+from wsgidav.dav_error import DAVError
|
|
|
28
|
+from wsgidav.dav_error import HTTP_FORBIDDEN
|
|
|
29
|
+from wsgidav.dav_error import HTTP_NOT_FOUND
|
28
|
from wsgidav.dav_provider import DAVCollection, DAVNonCollection
|
30
|
from wsgidav.dav_provider import DAVCollection, DAVNonCollection
|
29
|
from wsgidav.dav_provider import _DAVResource
|
31
|
from wsgidav.dav_provider import _DAVResource
|
30
|
from tracim.lib.webdav.utils import normpath
|
32
|
from tracim.lib.webdav.utils import normpath
|
|
|
|
|
230
|
# INFO - G.M - 21-03-2018 - Obtain true davFile from provider
|
232
|
# INFO - G.M - 21-03-2018 - Obtain true davFile from provider
|
231
|
resource = self.provider.getResourceInst(path, self.environ)
|
233
|
resource = self.provider.getResourceInst(path, self.environ)
|
232
|
if not resource:
|
234
|
if not resource:
|
233
|
- raise DAVError(HTTP_FORBIDDEN)
|
|
|
|
|
235
|
+ raise DAVError(HTTP_NOT_FOUND)
|
234
|
content = resource.content
|
236
|
content = resource.content
|
235
|
- return File(path=path, content=content,environ=self.environ)
|
|
|
|
|
237
|
+ return File(path=path, content=content, environ=self.environ)
|
236
|
|
238
|
|
237
|
def createCollection(self, label: str) -> 'Folder':
|
239
|
def createCollection(self, label: str) -> 'Folder':
|
238
|
"""
|
240
|
"""
|