summaryrefslogtreecommitdiff
path: root/seivot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-07-19 19:15:12 +0100
committerLars Wirzenius <liw@liw.fi>2011-07-19 19:15:12 +0100
commit08f90669dc744265b9097921ee88aede1208f165 (patch)
treef114ece72e3bffc816b0a74cd5211340af4548c8 /seivot
parentfb7c5d3dd14d7352ab06987ab62bcb149558f7e8 (diff)
downloadseivot-08f90669dc744265b9097921ee88aede1208f165.tar.gz
Fix removal of pre-existing live data tree.
Diffstat (limited to 'seivot')
-rwxr-xr-xseivot3
1 files changed, 2 insertions, 1 deletions
diff --git a/seivot b/seivot
index 26f9e53..df9388f 100755
--- a/seivot
+++ b/seivot
@@ -381,7 +381,8 @@ class Seivot(cliapp.Application):
self.report = Report(prog)
if self.settings['use-existing']:
- os.rmdir(self.live_data)
+ if os.path.exists(self.live_data):
+ shutil.rmtree(self.live_data)
shutil.copytree(self.settings['use-existing'], self.live_data,
symlinks=True)
amount = self.file_sizes(self.live_data)