diff options
author | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-05-08 16:27:19 +0100 |
---|---|---|
committer | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-07-24 12:32:59 +0100 |
commit | 8d5f872733f2b8ac5e72d83ddc5948552f3fce92 (patch) | |
tree | abf5f162f588a9f6312b678786239668fecade7f | |
parent | 5d277366129b3640f3d715e7966bb874d653e750 (diff) | |
download | buildstream-8d5f872733f2b8ac5e72d83ddc5948552f3fce92.tar.gz |
sandbox: Remove instances of get_directory
sandbox/_mount.py, sandbox/_sandboxbwrap.py:
Remove instances of get_directory
-rw-r--r-- | buildstream/sandbox/_mount.py | 3 | ||||
-rw-r--r-- | buildstream/sandbox/_sandboxbwrap.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/buildstream/sandbox/_mount.py b/buildstream/sandbox/_mount.py index 1540d9d4f..0f96a92b7 100644 --- a/buildstream/sandbox/_mount.py +++ b/buildstream/sandbox/_mount.py @@ -32,7 +32,8 @@ from .._fuse import SafeHardlinks class Mount(): def __init__(self, sandbox, mount_point, safe_hardlinks): scratch_directory = sandbox._get_scratch_directory() - root_directory = sandbox.get_directory() + # Getting external_directory here is acceptable as we're part of the sandbox code. + root_directory = sandbox.get_virtual_directory().external_directory self.mount_point = mount_point self.safe_hardlinks = safe_hardlinks diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py index 9ed677620..010e4791d 100644 --- a/buildstream/sandbox/_sandboxbwrap.py +++ b/buildstream/sandbox/_sandboxbwrap.py @@ -56,7 +56,9 @@ class SandboxBwrap(Sandbox): def run(self, command, flags, *, cwd=None, env=None): stdout, stderr = self._get_output() - root_directory = self.get_directory() + + # Allowable access to underlying storage as we're part of the sandbox + root_directory = self.get_virtual_directory().external_directory # Fallback to the sandbox default settings for # the cwd and env. |