Skip to content

Commit

Permalink
fix: remove the file after upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrutchf committed Dec 10, 2024
1 parent 46542fd commit 1e4ea34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/subcommands/main_subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ impl CustomTransferAgent for MainSubcommand {
return Ok(())
}

let file_station = self.file_station.clone().context("File Station should not be null")?;
file_station.upload(source_path, event.size.context("Size should not be null")?, configuration.path.as_str(), false, false, None, None, None, Some(progress_reporter)).await?;

// Remove the path if the compressed source path is not the same as the source path provided by git lfs.
if event_source_path != compressed_source_path {
let path = Path::new(&compressed_source_path);
remove_file(path).await?;
}

let file_station = self.file_station.clone().context("File Station should not be null")?;
file_station.upload(source_path, event.size.context("Size should not be null")?, configuration.path.as_str(), false, false, None, None, None, Some(progress_reporter)).await?;

info!("Upload finished.");
Ok(())
}
Expand Down

0 comments on commit 1e4ea34

Please sign in to comment.