diff options
author | Jürg Billeter <j@bitron.ch> | 2019-10-24 12:34:06 +0200 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-11-11 18:37:07 +0000 |
commit | 1d08b5176c644174097986bf24e2c0cc8beefb81 (patch) | |
tree | 405241c7bfdcbaee3c27876ebf4600ac7e1f2eaa | |
parent | 74fa2537788d0933c7d0b229504a1bd30dd7a451 (diff) | |
download | buildstream-1d08b5176c644174097986bf24e2c0cc8beefb81.tar.gz |
_sandboxremote.py: Ensure working directory exists
-rw-r--r-- | src/buildstream/sandbox/_sandboxremote.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py index 77bb34fa9..bc292cf60 100644 --- a/src/buildstream/sandbox/_sandboxremote.py +++ b/src/buildstream/sandbox/_sandboxremote.py @@ -338,6 +338,11 @@ class SandboxRemote(Sandbox): # set up virtual dircetory upload_vdir = self.get_virtual_directory() + # Ensure working directory exists + if len(cwd) > 1: + assert cwd.startswith('/') + upload_vdir.descend(*cwd[1:].split(os.path.sep), create=True) + # Create directories for all marked directories. This emulates # some of the behaviour of other sandboxes, which create these # to use as mount points. |