Skip to content

Commit

Permalink
fix: don't compress file if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrutchf committed Dec 11, 2024
1 parent 6ceff59 commit 152eacd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/subcommands/main_subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ impl CustomTransferAgent for MainSubcommand {
git_lfs_progress_reporter
};

info!("Attempting to compress the source file.");
let compressed_source_path = self.compress_file(&event_source_path).await?;

let source_path = Path::new(&compressed_source_path);
let target_path = format!(
"{}/{}",
configuration.path,
Expand All @@ -147,6 +143,10 @@ impl CustomTransferAgent for MainSubcommand {
return Ok(())
}

info!("Attempting to compress the source file.");
let compressed_source_path = self.compress_file(&event_source_path).await?;

let source_path = Path::new(&compressed_source_path);
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?;

Expand Down

0 comments on commit 152eacd

Please sign in to comment.