Es wird auch nicht auf den MD5 Hash geprüft. Bei vielen Dateien wäre das langsam.
Es gibt ein Check auf Dateigröße in Byte und den letzen zugriff auf die Datei.
Noch ist die Patchlist nicht verschlüpsselt, daher kann man das in der list.txt selbst einsehen.
Warte noch etwas ab, ich pack dann MD5 als Zusatz (optional) check ein.
If the person Is american, or uses the date format MM/DD/YYYY on their computer as opposed to DD/MM/YYYY.
It willl throw an exception and not change the dates of the files nor will it finish the patching.
I fixed it in a very hacky way
Code:
Dim dateString, format As String
Dim result As Date
Dim provider As Globalization.CultureInfo = Globalization.CultureInfo.InvariantCulture
' Parse date and time with custom specifier.
' 20.01.2013 04:46:54
dateString = Args(2)
Dim strDate2 As String
Try
If Month("01-02-03") = 1 Then
strDate2 = DateTime.ParseExact(Args(2),
"dd.MM.yyyy hh:mm:ss",
provider).ToString("MM.dd.yyyy hh:mm:ss")
result = Date.ParseExact(strDate2, "MM.dd.yyyy hh:mm:ss", provider)
Else
result = Date.ParseExact(Args(2), "dd.MM.yyyy hh:mm:ss", provider)
End If
Catch e As FormatException
CFunc.Status("Error: Converting Date Failed!") ' Status setzem
End Try
Try
File.SetLastWriteTime(Args(0).Remove(Args(0).Length - 3), result)
Catch e As FormatException
CFunc.Status("Error: SetLastWriteTime Failed!") ' Status setzem
End Try
Because the time format changes on every persons computer...
I have on dude with 01/28/2013, I am 28/01/2013, one guy has 1/28/13
and if its different format it just doesn't work.
EDIT: Less of a "Hacky" Fix
Change the FileCheck() Function in CFunc.vb to:
Code:
' Datei überprüfen
Public Shared Sub FileCheck(ByVal Param() As String)
If File.Exists(Param(0)) Then
If Not New FileInfo(Param(0)).LastWriteTime = DateTime.ParseExact(Param(2), "dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture) Or Not New FileInfo(Param(0)).Length = Param(1) Or (Config.UseMd5Check AndAlso Not Param(3) = CFunc.MD5FileHash(Param(0))) Then
CFunc.DeleteFile(Param(0))
CFunc.PatchList = CFunc.AddLineToStringArray(CFunc.PatchList, Param(0) & ".gz" & vbTab & Param(1) & vbTab & Param(2))
CFunc.MaxUpdate += 1
End If
Else
CFunc.PatchList = CFunc.AddLineToStringArray(CFunc.PatchList, Param(0) & ".gz" & vbTab & Param(1) & vbTab & Param(2))
CFunc.MaxUpdate += 1
End If
End Sub
Will force the format to follow dd.MM.yyyy HH:mm:ss
I'm gonna fix it in an another faster way.
My way only needs 2 lines.
Edit:
Ich habe jetzt schonmal zwei kleinere Änderungen durchgenommen.
- Es gab bei Usern mit dem MM.dd.yyyy Format einen Error, da diese nicht unser Datum format haben, dies wurde gefixxt.
- Man kann jetzt in den Konfigs die Farbe des Start Button auch bestimmen.
I'm gonna fix it in an another faster way.
My way only needs 2 lines.
Edit:
Ich habe jetzt schonmal zwei kleinere Änderungen durchgenommen.
- Es gab bei Usern mit dem MM.dd.yyyy Format einen Error, da diese nicht unser Datum format haben, dies wurde gefixxt.
- Man kann jetzt in den Konfigs die Farbe des Start Button auch bestimmen.
Uh ok? I wasn't being competitive, just trying to help =\
Open Source Patcher by Sedrika 06/02/2012 - Metin2 Private Server - 0 Replies Moin Moin,
ich habe ein kleines Problem mit diesem Patcher http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/1890023-open-source-patcher-v1-8-1 4-a.html.
Habe die GlobalConfig.vb angepasst und alles dann kompiliert. Dann eine list.txt
erstellt (Pfad in dem mein Client drin ist eingegeben, Create List geklickt und
dann Compress). So wurden alle meine Daten in .gz komprimiert, welche ich dann
auch auf einen Webspace geladen (in meinem Fall habe ich funpic benutzt. Hab ...
Sedrika open Source Patcher Problem 03/22/2012 - Flyff Private Server - 17 Replies Hey Leute,
ich habe folgendes Prob. Wenn ich den Patcher von sedrika starte kommt immer eine Meldung There is a new update und danach ein error "Could not find NewPatcher.exe on the server" Nun meine frage wo soll ich die Datei jetzt hinpacken und welche datei ist das überhaupt wo finde ich die? schonmal danke;)
HILFE!!!