[ARVADOS] updated: 1.2.0-307-g68269e98c
Git user
git at public.curoverse.com
Tue Nov 6 09:55:26 EST 2018
Summary of changes:
sdk/python/arvados/collection.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
via 68269e98cad46ebf8adcf2d55fbbd45eba582b86 (commit)
from f90b933c50d1b7807a474e1a909ea07217a42fe6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 68269e98cad46ebf8adcf2d55fbbd45eba582b86
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Tue Nov 6 09:54:10 2018 -0500
14345: Accept "." placeholder: create parent dir, but no fake file.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index d354b9f7b..5293e3525 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -1717,12 +1717,17 @@ class Collection(RichCollectionBase):
pos = int(file_segment.group(1))
size = int(file_segment.group(2))
name = self._unescape_manifest_path(file_segment.group(3))
- filepath = os.path.join(stream_name, name)
- afile = self.find_or_create(filepath, FILE)
- if isinstance(afile, ArvadosFile):
- afile.add_segment(blocks, pos, size)
+ if name.split('/')[-1] == '.':
+ # placeholder for persisting an empty directory, not a real file
+ if len(name) > 2:
+ self.find_or_create(os.path.join(stream_name, name[:-2]), COLLECTION)
else:
- raise errors.SyntaxError("File %s conflicts with stream of the same name.", filepath)
+ filepath = os.path.join(stream_name, name)
+ afile = self.find_or_create(filepath, FILE)
+ if isinstance(afile, ArvadosFile):
+ afile.add_segment(blocks, pos, size)
+ else:
+ raise errors.SyntaxError("File %s conflicts with stream of the same name.", filepath)
else:
# error!
raise errors.SyntaxError("Invalid manifest format, expected file segment but did not match format: '%s'" % tok)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list