From 2b9fbf366d2ad3c23a9af7d85000c4f420628ae1 Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Sun, 20 Sep 2020 10:06:46 +0100 Subject: _context.py: don't delete bst1 extract directory --- src/buildstream/_context.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py index 87b23d50c..34fc6f274 100644 --- a/src/buildstream/_context.py +++ b/src/buildstream/_context.py @@ -303,10 +303,9 @@ class Context: os.symlink(self.casdir, old_casdir) # Cleanup old extract directories - old_extractdirs = [os.path.join(self.cachedir, "artifacts", "extract"), os.path.join(self.cachedir, "extract")] - for old_extractdir in old_extractdirs: - if os.path.isdir(old_extractdir): - shutil.rmtree(old_extractdir, ignore_errors=True) + old_extractdir = os.path.join(self.cachedir, "extract") + if os.path.isdir(old_extractdir): + shutil.rmtree(old_extractdir, ignore_errors=True) # Load quota configuration # We need to find the first existing directory in the path of our -- cgit v1.2.1