Skip to content

Commit

Permalink
tidy up the code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Sep 25, 2023
1 parent 3a0f74f commit a817484
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion DrsPlugin/Attachers/DrsFileAttacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ private void UpdateRAWWithImageArchiveLocations(IDataLoadJob job, Dictionary<str
if (!entry.Any())
throw new InvalidOperationException($"There are no file mappings for archive: {archive}");

//here?
var query =
$"UPDATE [{TableName}] SET {ImageArchiveUriColumnName} = CONCAT('{archive}!', {FilenameColumnName}) WHERE {FilenameColumnName} IN ('{string.Join("','", entry)}')";

Expand Down
6 changes: 3 additions & 3 deletions DrsPlugin/Extraction/DRSImageExtraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public override DataTable ProcessPipelineData(DataTable toProcess, IDataLoadEven

if (string.IsNullOrWhiteSpace(row[ImageUriColumnName].ToString()))
{
//here is a skip
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning,
$"Row {progress} does not have a corresponding image, [{ImageUriColumnName}] is empty."));
continue;
Expand All @@ -83,9 +82,10 @@ public override DataTable ProcessPipelineData(DataTable toProcess, IDataLoadEven
{
File.Copy(Path.Combine(PathToImageArchive, sourceFileName), newFilename);
}
catch (Exception e)
catch (Exception e) //todo this should handle the exceptions better

Check warning on line 85 in DrsPlugin/Extraction/DRSImageExtraction.cs

View workflow job for this annotation

GitHub Actions / package

The variable 'e' is declared but never used

Check warning on line 85 in DrsPlugin/Extraction/DRSImageExtraction.cs

View workflow job for this annotation

GitHub Actions / package

The variable 'e' is declared but never used
{

listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information,
$"Failed to copy file (${sourceFileName})."));
}

continue;
Expand Down

0 comments on commit a817484

Please sign in to comment.