diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-15 11:08:31 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-15 11:08:31 +0000 |
commit | 9ccf3b476e54034f198102ed9858a8072acf4729 (patch) | |
tree | 3036a4fc86b956059f8193c259600599af55e084 | |
parent | 594eda8aa3e387841085c6a59d0f7627142a8514 (diff) | |
parent | 1622a43da4d2de3483013abdae1b7a7b8d478a0c (diff) | |
download | buildstream-9ccf3b476e54034f198102ed9858a8072acf4729.tar.gz |
Merge branch 'aevri/tmpdir_for_cache_size' into 'master'
cascache: atomically save size via tmpdir instead
See merge request BuildStream/buildstream!1226
-rw-r--r-- | buildstream/_cas/cascache.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_cas/cascache.py b/buildstream/_cas/cascache.py index 04a09299a..2be16067b 100644 --- a/buildstream/_cas/cascache.py +++ b/buildstream/_cas/cascache.py @@ -1187,7 +1187,7 @@ class CASQuota: def _write_cache_size(self, size): assert isinstance(size, int) size_file_path = os.path.join(self.casdir, CACHE_SIZE_FILE) - with utils.save_file_atomic(size_file_path, "w") as f: + with utils.save_file_atomic(size_file_path, "w", tempdir=self.cas.tmpdir) as f: f.write(str(size)) # _get_cache_volume_size() |