Prechádzať zdrojové kódy

log if destination directory is not a collection

Peter Bieringer 1 rok pred
rodič
commit
e07a248451
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      radicale/app/put.py

+ 2 - 0
radicale/app/put.py

@@ -176,6 +176,8 @@ class ApplicationPartPut(ApplicationBase):
 
 
             if write_whole_collection:
             if write_whole_collection:
                 if ("w" if tag else "W") not in access.permissions:
                 if ("w" if tag else "W") not in access.permissions:
+                    if not parent_item.tag:
+                        logger.warning("Not a collection (check .Radicale.props): %r", parent_item.path)
                     return httputils.NOT_ALLOWED
                     return httputils.NOT_ALLOWED
                 if not self._permit_overwrite_collection:
                 if not self._permit_overwrite_collection:
                     if ("O") not in access.permissions:
                     if ("O") not in access.permissions: