pfad
This commit is contained in:
@@ -171,32 +171,36 @@ Public Class cAllgemein
|
||||
End Sub
|
||||
|
||||
Public Shared Sub LOAD_CHAT_EMOJIS()
|
||||
|
||||
Dim EMOJI_SOURCEPATH = DATENVERVER_OPTIONS.getRootDir & "\DOKUMENTE\CHAT_EMOJIS\"
|
||||
Dim EMOJI_SOURCELIST = System.IO.Directory.GetFiles(EMOJI_SOURCEPATH).ToList
|
||||
|
||||
EMOJI_PATH = System.IO.Path.GetFullPath(My.Application.Info.DirectoryPath & "\Resources\CHAT_EMOJIS\")
|
||||
|
||||
Try
|
||||
If Not System.IO.Directory.Exists(EMOJI_PATH) Then
|
||||
System.IO.Directory.CreateDirectory(EMOJI_PATH)
|
||||
End If
|
||||
If System.IO.Directory.Exists(DATENVERVER_OPTIONS.getRootDir & "\DOKUMENTE\CHAT_EMOJIS\") Then
|
||||
|
||||
Dim EMOJI_SOURCEPATH = DATENVERVER_OPTIONS.getRootDir & "\DOKUMENTE\CHAT_EMOJIS\"
|
||||
Dim EMOJI_SOURCELIST = System.IO.Directory.GetFiles(EMOJI_SOURCEPATH).ToList
|
||||
|
||||
EMOJI_PATH = System.IO.Path.GetFullPath(My.Application.Info.DirectoryPath & "\Resources\CHAT_EMOJIS\")
|
||||
|
||||
|
||||
For Each f In System.IO.Directory.GetFiles(EMOJI_PATH)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
If Not System.IO.Directory.GetFiles(EMOJI_PATH).Any(Function(c) c.Equals(fi.Name, StringComparison.OrdinalIgnoreCase)) Then
|
||||
System.IO.File.Delete(f)
|
||||
If Not System.IO.Directory.Exists(EMOJI_PATH) Then
|
||||
System.IO.Directory.CreateDirectory(EMOJI_PATH)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
For Each f In System.IO.Directory.GetFiles(EMOJI_SOURCEPATH)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
fi.CopyTo(EMOJI_PATH & fi.Name, False)
|
||||
For Each f In System.IO.Directory.GetFiles(EMOJI_PATH)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
If Not System.IO.Directory.GetFiles(EMOJI_PATH).Any(Function(c) c.Equals(fi.Name, StringComparison.OrdinalIgnoreCase)) Then
|
||||
System.IO.File.Delete(f)
|
||||
End If
|
||||
|
||||
Next
|
||||
Next
|
||||
|
||||
For Each f In System.IO.Directory.GetFiles(EMOJI_SOURCEPATH)
|
||||
Dim fi As New System.IO.FileInfo(f)
|
||||
fi.CopyTo(EMOJI_PATH & fi.Name, False)
|
||||
|
||||
Next
|
||||
Else
|
||||
MsgBox("Fehler: Chat-Emojis Verzeichnis existiert nicht!")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
|
||||
Reference in New Issue
Block a user