Skip to content
Snippets Groups Projects
Commit a05bea7d authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Merge pull request #681 from LLNL/bugfix/complete-restage

Fix bug in restage
parents 275943d8 dfc5cf28
Branches
Tags
No related merge requests found
......@@ -289,8 +289,14 @@ def reset(self):
if not self.archive_file:
raise NoArchiveFileError("Tried to reset URLFetchStrategy before fetching",
"Failed on reset() for URL %s" % self.url)
if self.stage.source_path:
shutil.rmtree(self.stage.source_path, ignore_errors=True)
# Remove everythigng but the archive from the stage
for filename in os.listdir(self.stage.path):
abspath = os.path.join(self.stage.path, filename)
if abspath != self.archive_file:
shutil.rmtree(abspath, ignore_errors=True)
# Expand the archive again
self.expand()
def __repr__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment