fix name generation for optional indexes
This commit is contained in:
parent
6983e4dac3
commit
fe21ae8409
@ -491,29 +491,22 @@ Public Class frmIndex
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
If optional_index = True Then
|
If optional_index = True Then
|
||||||
Dim result As MsgBoxResult
|
oNamenkonvention = oNamenkonvention.Replace("-" & oElement.Value & "-", "-")
|
||||||
|
oNamenkonvention = oNamenkonvention.Replace("_" & oElement.Value & "_", "_")
|
||||||
|
oNamenkonvention = oNamenkonvention.Replace("_" & oElement.Value & "-", "_")
|
||||||
|
oNamenkonvention = oNamenkonvention.Replace("-" & oElement.Value & "_", "-")
|
||||||
|
|
||||||
'If USER_LANGUAGE = "de-DE" Then
|
oNamenkonvention = oNamenkonvention.Replace("-" & oElement.Value, "-")
|
||||||
' result = MessageBox.Show("Achtung der optionale Index ist leer, wird aber für die Benennung der Datei benutzt." & vbNewLine & "Wollen Sie stattdessen den Originaldateinamen verwenden?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
oNamenkonvention = oNamenkonvention.Replace("_" & oElement.Value, "_")
|
||||||
'Else
|
oNamenkonvention = oNamenkonvention.Replace(oElement.Value & "-", "-")
|
||||||
' result = MessageBox.Show("Attention: optional index is empty, but is being used in renaming the file." & vbNewLine & "Do you want to use the original filename instead?", "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
oNamenkonvention = oNamenkonvention.Replace(oElement.Value & "_", "_")
|
||||||
'End If
|
|
||||||
|
oNamenkonvention = oNamenkonvention.Replace(oElement.Value, oManValue)
|
||||||
|
|
||||||
'If result = MsgBoxResult.Yes Then
|
|
||||||
' oNamenkonvention = oNamenkonvention.Replace(oElement.Value, System.IO.Path.GetFileNameWithoutExtension(CURRENT_WORKFILE))
|
|
||||||
' NewFileString = oNamenkonvention
|
|
||||||
' sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString
|
|
||||||
' AnzahlIndexe += 1
|
|
||||||
' sql_history_Index_Values = sql_history_Index_Values & ", '" & System.IO.Path.GetFileNameWithoutExtension(CURRENT_WORKFILE).Replace("'", "''") & "'"
|
|
||||||
'Else
|
|
||||||
oNamenkonvention = oNamenkonvention.Replace("_" & oElement.Value, oManValue)
|
|
||||||
oNamenkonvention = oNamenkonvention.Replace("-" & oElement.Value, oManValue)
|
|
||||||
NewFileString = oNamenkonvention
|
NewFileString = oNamenkonvention
|
||||||
sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString
|
sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString
|
||||||
AnzahlIndexe += 1
|
AnzahlIndexe += 1
|
||||||
sql_history_Index_Values = sql_history_Index_Values & ", '" & oManValue.Replace("'", "''") & "'"
|
sql_history_Index_Values = sql_history_Index_Values & ", '" & oManValue.Replace("'", "''") & "'"
|
||||||
' End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
LOGGER.Debug("Der Indexvalue für Index '" & Indexname & "' ist String.Empty")
|
LOGGER.Debug("Der Indexvalue für Index '" & Indexname & "' ist String.Empty")
|
||||||
err = True
|
err = True
|
||||||
@ -2454,6 +2447,8 @@ Public Class frmIndex
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next sonderChar
|
Next sonderChar
|
||||||
|
oNewFullPath = WINDREAM.GetCleanedPath(oNewFullPath)
|
||||||
|
|
||||||
LOGGER.Info("Fullpath (ohne SZ) '" & oNewFullpath & "'")
|
LOGGER.Info("Fullpath (ohne SZ) '" & oNewFullpath & "'")
|
||||||
If Directory.Exists(oNewFullpath) = False Then
|
If Directory.Exists(oNewFullpath) = False Then
|
||||||
Try
|
Try
|
||||||
@ -2466,7 +2461,6 @@ Public Class frmIndex
|
|||||||
MsgBox("Attention: Root Folder '" & oNewFullpath & "' could not be created." & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Attention: Root Folder '" & oNewFullpath & "' could not be created." & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CURRENT_NEWFILENAME = Path.Combine(oNewFullpath, Path.GetFileName(CURRENT_NEWFILENAME))
|
CURRENT_NEWFILENAME = Path.Combine(oNewFullpath, Path.GetFileName(CURRENT_NEWFILENAME))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user