Filter snapshots directory during the snapshot, Fixes: #1297

This commit is contained in:
ziajka committed 2018-02-28 16:33:20 +01:00
1 parent 835bc24b44
commit 09c7d73ee9
2 files changed
+46 -1

No files matched your search

+6 -1
View File
@@ -29,7 +29,8 @@ log = logging.getLogger(__name__)
@asyncio.coroutine
def export_project(project, temporary_dir, include_images=False, keep_compute_id=False, allow_all_nodes=False):
def export_project(project, temporary_dir, include_images=False, keep_compute_id=False,
allow_all_nodes=False, ignore_prefixes=None):
"""
Export the project as zip. It's a ZipStream object.
The file will be read chunk by chunk when you iterate on
@@ -111,6 +112,10 @@ def _filter_files(path):
if path.endswith("snapshots"):
return True
# filter directory of snapshots
if "{sep}snapshots{sep}".format(sep=os.path.sep) in path:
return True
try:
i = s.index("project-files")
if s[i + 1] in ("tmp", "captures", "snapshots"):