Compare commits

...

2 Commits

Author SHA1 Message Date
a159516c6b Modules.Jobs: Version 3.9.1.0 2026-11-09 14:02:25 +01:00
462600d1b3 Modules.Jobs: Dateien löschen, falls Prüfung fehlschlägt 2026-11-09 14:01:33 +01:00
2 changed files with 23 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2026")>
<Assembly: AssemblyTrademark("3.9.0.0")>
<Assembly: AssemblyTrademark("3.9.1.0")>
<Assembly: ComVisible(False)>
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("3.9.0.0")>
<Assembly: AssemblyFileVersion("3.9.0.0")>
<Assembly: AssemblyVersion("3.9.1.0")>
<Assembly: AssemblyFileVersion("3.9.1.0")>

View File

@@ -868,6 +868,7 @@ Public Class ImportZUGFeRDFiles
_logger.Error("Could not save File to Disk!")
Dim oReasonString = "Could not save file " + newAttachmentFilename + " to disk."
AddRejectedState(pMessageId, oReasonString, "EMBEDDED FILE CONSISTENCY NOT OK", "Info GUI", pConnections.SQLServerTransaction)
nextAttachmentIndex += 1
Continue For
End If
@@ -875,6 +876,11 @@ Public Class ImportZUGFeRDFiles
_logger.Error("Could not save File to Disk!")
Dim oReasonString = "Validation of file " + newAttachmentFilename + " on disk was NOT succesfully."
AddRejectedState(pMessageId, oReasonString, "EMBEDDED FILE CONSISTENCY NOT OK", "Info GUI", pConnections.SQLServerTransaction)
' Datei ist Murks und muss gelöscht werden, wenn möglich
DeleteFileFromDisk(embeddedFilePath)
nextAttachmentIndex += 1
Continue For
End If
@@ -920,6 +926,20 @@ Public Class ImportZUGFeRDFiles
End Try
End Function
Private Function DeleteFileFromDisk(pEmbeddedFilePath As String) As Boolean
Try
Dim oFile As FileInfo = New FileInfo(pEmbeddedFilePath)
If oFile IsNot Nothing Then
oFile.Delete()
End If
Return True
Catch ex As Exception
_logger.Warn("Coul not delete file {0}.", pEmbeddedFilePath)
Return False
End Try
End Function
Private Function GetEmbeddedFileExtension(pMimeTypeValue As String) As String
If pMimeTypeValue.IsNullOrEmpty() Then