Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
closes #764
Browse files Browse the repository at this point in the history
  • Loading branch information
forman committed Sep 24, 2018
1 parent 5e31b4f commit e2dfa83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Version 2.0.0.dev20 (in development)

* Fixed problem where workspace save-as sometimes fails on Windows [#764](https://github.com/CCI-Tools/cate/issues/764)


## Version 2.0.0.dev19

Expand Down
5 changes: 4 additions & 1 deletion cate/core/wsmanag.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def save_workspace_as(self, base_dir: str, to_dir: str,
new_workspace = self.open_workspace(to_dir, monitor=monitor.child(work=50))
# If it was a scratch workspace, delete the original
if workspace.is_scratch:
shutil.rmtree(base_dir)
try:
shutil.rmtree(base_dir)
except (PermissionError, OSError):
pass
monitor.progress(work=5)
return new_workspace

Expand Down

0 comments on commit e2dfa83

Please sign in to comment.