Explorar el Código

Hide collection.props

Guillaume Ayoub hace 9 años
padre
commit
5b04ba18a8
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      radicale/storage.py

+ 4 - 4
radicale/storage.py

@@ -333,8 +333,8 @@ class Collection(BaseCollection):
         self.path = sanitize_path(path).strip("/")
         self.storage_encoding = self.configuration.get("encoding", "stock")
         self._filesystem_path = path_to_filesystem(folder, self.path)
-        self._props_path = path_to_filesystem(self._filesystem_path,
-                                              "collection.props")
+        self._props_path = path_to_filesystem(
+            self._filesystem_path, ".collection.props")
         split_path = self.path.split("/")
         if len(split_path) > 1:
             # URL with at least one folder
@@ -458,7 +458,7 @@ class Collection(BaseCollection):
                 self.logger.debug("Skipping component: %s", href)
                 continue
             path = os.path.join(self._filesystem_path, href)
-            if not href.endswith(".props") and os.path.isfile(path):
+            if os.path.isfile(path):
                 with open(path, encoding=self.storage_encoding) as fd:
                     yield href, get_etag(fd.read())
 
@@ -572,7 +572,7 @@ class Collection(BaseCollection):
                 self.logger.debug("Skipping component: %s", href)
                 continue
             path = os.path.join(self._filesystem_path, href)
-            if os.path.isfile(path) and not path.endswith(".props"):
+            if os.path.isfile(path):
                 with open(path, encoding=self.storage_encoding) as fd:
                     items.append(vobject.readOne(fd.read()))
         if self.get_meta("tag") == "VCALENDAR":