Commit b3b0fcdd authored by Peter Eastman's avatar Peter Eastman
Browse files

DiskDataset.move() would not overwrite an existing dataset

parent f61ae8d4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -649,6 +649,8 @@ class DiskDataset(Dataset):

  def move(self, new_data_dir):
    """Moves dataset to new directory."""
    if os.path.isdir(new_data_dir):
      shutil.rmtree(new_data_dir)
    shutil.move(self.data_dir, new_data_dir)
    self.data_dir = new_data_dir