summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbderrahim Kitouni <akitouni@gnome.org>2020-09-20 10:06:46 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2020-11-05 20:16:00 +0000
commitc66f8b5c1f0d0f2b3d4d1061bc427eaa92792a95 (patch)
tree0449931cdb0f30c98773af4765f45f12525b5a34
parent9f205147b5461cc29486f2c1830e88913a8d098e (diff)
downloadbuildstream-abderrahim/no-delete-extract.tar.gz
_context.py: don't delete bst1 extract directoryabderrahim/no-delete-extract
-rw-r--r--src/buildstream/_context.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py
index 0c2d1a150..80f7b1a18 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