Hide collection.props
This commit is contained in:
parent
da22778ce3
commit
5b04ba18a8
@ -333,8 +333,8 @@ class Collection(BaseCollection):
|
|||||||
self.path = sanitize_path(path).strip("/")
|
self.path = sanitize_path(path).strip("/")
|
||||||
self.storage_encoding = self.configuration.get("encoding", "stock")
|
self.storage_encoding = self.configuration.get("encoding", "stock")
|
||||||
self._filesystem_path = path_to_filesystem(folder, self.path)
|
self._filesystem_path = path_to_filesystem(folder, self.path)
|
||||||
self._props_path = path_to_filesystem(self._filesystem_path,
|
self._props_path = path_to_filesystem(
|
||||||
"collection.props")
|
self._filesystem_path, ".collection.props")
|
||||||
split_path = self.path.split("/")
|
split_path = self.path.split("/")
|
||||||
if len(split_path) > 1:
|
if len(split_path) > 1:
|
||||||
# URL with at least one folder
|
# URL with at least one folder
|
||||||
@ -458,7 +458,7 @@ class Collection(BaseCollection):
|
|||||||
self.logger.debug("Skipping component: %s", href)
|
self.logger.debug("Skipping component: %s", href)
|
||||||
continue
|
continue
|
||||||
path = os.path.join(self._filesystem_path, href)
|
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:
|
with open(path, encoding=self.storage_encoding) as fd:
|
||||||
yield href, get_etag(fd.read())
|
yield href, get_etag(fd.read())
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ class Collection(BaseCollection):
|
|||||||
self.logger.debug("Skipping component: %s", href)
|
self.logger.debug("Skipping component: %s", href)
|
||||||
continue
|
continue
|
||||||
path = os.path.join(self._filesystem_path, href)
|
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:
|
with open(path, encoding=self.storage_encoding) as fd:
|
||||||
items.append(vobject.readOne(fd.read()))
|
items.append(vobject.readOne(fd.read()))
|
||||||
if self.get_meta("tag") == "VCALENDAR":
|
if self.get_meta("tag") == "VCALENDAR":
|
||||||
|
Loading…
Reference in New Issue
Block a user