Skip to content

Commit 007e57d

Browse files
committed
fixed windows rename error on downloading commit entries db
1 parent dcfa71d commit 007e57d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/src/api/remote/commits.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -594,11 +594,12 @@ pub async fn download_commit_entries_db_to_path(
594594
util::fs::remove_dir_all(&full_unpacked_path)?;
595595
} else {
596596
log::debug!("{} creating {:?}", current_function!(), full_unpacked_path);
597-
std::fs::create_dir_all(&full_unpacked_path)?;
597+
std::fs::create_dir_all(&full_unpacked_path.parent().unwrap())?;
598598
}
599599

600600
// Move the tmp path to the full path
601601
log::debug!("renaming {:?} to {:?}", tmp_path, full_unpacked_path);
602+
602603
std::fs::rename(
603604
tmp_path.join(HISTORY_DIR).join(commit_id),
604605
&full_unpacked_path,

0 commit comments

Comments
 (0)