File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
` cargo-install-upgrade ` crate. This will speed up the workspace
25
25
initialization.
26
26
27
+ ### Fixed
28
+
29
+ - Calling ` Workspace::purge_all_build_dirs ` returned an error when no
30
+ directories were present instead of doing nothing.
31
+
27
32
## [ 0.2.0] - 2019-09-06
28
33
29
34
### Added
Original file line number Diff line number Diff line change @@ -171,7 +171,10 @@ impl Workspace {
171
171
172
172
/// Remove all the contents of all the build directories, freeing disk space.
173
173
pub fn purge_all_build_dirs ( & self ) -> Result < ( ) , Error > {
174
- remove_dir_all ( self . builds_dir ( ) ) ?;
174
+ let dir = self . builds_dir ( ) ;
175
+ if dir. exists ( ) {
176
+ remove_dir_all ( & dir) ?;
177
+ }
175
178
Ok ( ( ) )
176
179
}
177
180
You can’t perform that action at this time.
0 commit comments