File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
turbopack/crates/turbo-tasks-backend/src Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,11 @@ pub fn handle_db_versioning(
143
143
}
144
144
} else {
145
145
path = base_path. join ( "temp" ) ;
146
- // propagate errors: if this fails we may have stale files left over in the temp directory
147
- remove_dir_all ( & path) ?;
146
+ if path. exists ( ) {
147
+ // propagate errors: if this fails we may have stale files left over in the temp
148
+ // directory
149
+ remove_dir_all ( & path) ?;
150
+ }
148
151
}
149
152
150
153
Ok ( path)
Original file line number Diff line number Diff line change @@ -166,9 +166,11 @@ impl<T: KeyValueDatabase> KeyValueDatabaseBackingStorage<T> {
166
166
where
167
167
T : Send + Sync + ' static ,
168
168
{
169
- let startup_cache_state = check_db_invalidation_and_cleanup ( & base_path) ?;
170
- let versioned_path = handle_db_versioning ( & base_path, version_info, is_ci) ?;
171
- let database = ( database) ( versioned_path) ?;
169
+ let startup_cache_state = check_db_invalidation_and_cleanup ( & base_path)
170
+ . context ( "Failed to check database invalidation and cleanup" ) ?;
171
+ let versioned_path = handle_db_versioning ( & base_path, version_info, is_ci)
172
+ . context ( "Failed to handle database versioning" ) ?;
173
+ let database = ( database) ( versioned_path) . context ( "Failed to open database" ) ?;
172
174
let backing_storage = Self {
173
175
inner : Arc :: new_cyclic (
174
176
move |weak_inner : & Weak < KeyValueDatabaseBackingStorageInner < T > > | {
You can’t perform that action at this time.
0 commit comments