diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index 9a8c917..eb0af3a 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -520,7 +520,14 @@ Public Class frmIndex oNamenkonvention = oNamenkonvention.Replace(oElement.Value, oManValue) - NewFileString = oNamenkonvention + Dim oFilenameWithoutExtension = Path.GetFileNameWithoutExtension(oNamenkonvention) + Dim oExtension = Path.GetExtension(oNamenkonvention) + + If oFilenameWithoutExtension.EndsWith("-") Or oFilenameWithoutExtension.EndsWith("_") Then + oFilenameWithoutExtension = oFilenameWithoutExtension.Substring(0, oFilenameWithoutExtension.Count - 1) + End If + + NewFileString = oFilenameWithoutExtension & oExtension sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString AnzahlIndexe += 1 sql_history_Index_Values = sql_history_Index_Values & ", '" & oManValue.Replace("'", "''") & "'"