summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Daniël Maat <tristan.maat@codethink.co.uk>2020-01-08 12:09:09 +0000
committerJürg Billeter <j@bitron.ch>2020-02-05 17:14:29 +0000
commit6e656334148360896eba996a2903c0dec1189c43 (patch)
treea15b5eb3bb5a5d56b585442fe2d3cb807c87e147 /src
parent7a0d01289daf1d8e6c868a8f22736b8829a4c625 (diff)
downloadbuildstream-6e656334148360896eba996a2903c0dec1189c43.tar.gz
_casbaseddirectory.py: Use the new _add_entry where possibletlater/CASdiff
Diffstat (limited to 'src')
-rw-r--r--src/buildstream/storage/_casbaseddirectory.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/buildstream/storage/_casbaseddirectory.py b/src/buildstream/storage/_casbaseddirectory.py
index 066693ea3..e86dd100c 100644
--- a/src/buildstream/storage/_casbaseddirectory.py
+++ b/src/buildstream/storage/_casbaseddirectory.py
@@ -459,15 +459,8 @@ class CasBasedDirectory(Directory):
if not is_dir:
if self._check_replacement(name, relative_pathname, result):
if entry.type == _FileType.REGULAR_FILE:
- self.index[name] = IndexEntry(
- name,
- _FileType.REGULAR_FILE,
- digest=entry.digest,
- is_executable=entry.is_executable,
- modified=True,
- node_properties=entry.node_properties,
- )
- self.__invalidate_digest()
+ self._add_entry(entry)
+ self.index[entry.name].modified = True
else:
assert entry.type == _FileType.SYMLINK
self._add_new_link_direct(name=name, target=entry.target)