Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
quambene committed Jan 30, 2024
1 parent e924a2b commit b980594
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ pub async fn remove_file_async(path: &Path) -> Result<(), BogrepError> {
}

/// Helper function to close and rename a file.
///
/// Closing the file before renaming it is needed on Windows.
pub fn close_and_rename(from: (File, &Path), to: (File, &Path)) -> Result<(), BogrepError> {
debug!("Close file at {}", from.1.display());
drop(from.0);
Expand Down

0 comments on commit b980594

Please sign in to comment.