Skip to content

Commit

Permalink
Merge pull request #3150 from reubenmiller/fix-upload-log-if-exists
Browse files Browse the repository at this point in the history
fix: check if log exists before trying to upload it
  • Loading branch information
reubenmiller authored Oct 3, 2024
2 parents a50bdcf + 17a0ecc commit 5903481
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/extensions/c8y_mapper_ext/src/operations/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ impl OperationContext {
command: &GenericCommandState,
) -> Result<(), ConversionError> {
if command.is_finished()
&& command.get_log_path().is_some()
&& command
.get_log_path()
.is_some_and(|log_path| log_path.exists())
&& (self.auto_log_upload == AutoLogUpload::Always
|| (self.auto_log_upload == AutoLogUpload::OnFailure && command.is_failed()))
{
Expand Down

0 comments on commit 5903481

Please sign in to comment.