bugs in nsis-update
i wondered for some weeks why nsis-update didn't work.
so i went through the code and found some bugs inside the function "PatchCVSRoot".
the corrected code is attached.
the old code:
Function PatchCVSRoot
Pop $TEMP1
FileOpen $TEMP2 $TEMP1 "r"
FileRead $TEMP2 $TEMP3
FileClose $TEMP3
Push $TEMP3
Call TrimNewLines
Pop $TEMP3
StrCmp $TEMP3 ":pserver:anonymous:@cvs1:/cvsroot/nsis" go
StrCmp $TEMP3 ":pserver:anonymous@cvs1:/cvsroot/nsis" go
Push "stop"
Return
go:
FileOpen $TEMP1 $TEMP1 "w"
FileWrite $TEMP2 ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/nsis$\r$\n"
FileClose $TEMP2
Push "go"
FunctionEnd
the new code:
Function PatchCVSRoot
Pop $TEMP1
FileOpen $TEMP2 $TEMP1 "r"
FileRead $TEMP2 $TEMP3
FileClose $TEMP2
Push $TEMP3
Call TrimNewLines
Pop $TEMP3
StrCmp $TEMP3 ":pserver:anonymous:@cvs1:/cvsroot/nsis" go
StrCmp $TEMP3 ":pserver:anonymous@cvs1:/cvsroot/nsis" go
Push "stop"
Return
go:
FileOpen $TEMP2 $TEMP1 "w"
FileWrite $TEMP2 ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/nsis$\r$\n"
FileClose $TEMP2
Push "go"
FunctionEnd