Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ pub fn handle_db_versioning(
}
} else {
path = base_path.join("temp");
// propagate errors: if this fails we may have stale files left over in the temp directory
remove_dir_all(&path)?;
if path.exists() {
// propagate errors: if this fails we may have stale files left over in the temp
// directory
remove_dir_all(&path)?;
}
}

Ok(path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ impl<T: KeyValueDatabase> KeyValueDatabaseBackingStorage<T> {
where
T: Send + Sync + 'static,
{
let startup_cache_state = check_db_invalidation_and_cleanup(&base_path)?;
let versioned_path = handle_db_versioning(&base_path, version_info, is_ci)?;
let database = (database)(versioned_path)?;
let startup_cache_state = check_db_invalidation_and_cleanup(&base_path)
.context("Failed to check database invalidation and cleanup")?;
let versioned_path = handle_db_versioning(&base_path, version_info, is_ci)
.context("Failed to handle database versioning")?;
let database = (database)(versioned_path).context("Failed to open database")?;
let backing_storage = Self {
inner: Arc::new_cyclic(
move |weak_inner: &Weak<KeyValueDatabaseBackingStorageInner<T>>| {
Expand Down
Loading