Hide collection.props

This commit is contained in:
Guillaume Ayoub 2016-08-02 16:51:50 +02:00
parent da22778ce3
commit 5b04ba18a8

View File

@ -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":