Bug 470797 - The GetLongPath macro returns paths with a trailing \. r=jmathies
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -2536,16 +2536,22 @@
; Store the counter for the current \ and prefix it for StrCpy operations.
StrCpy $R4 "+$R6"
IntOp $R6 $R6 + 1 ; Increment the counter so we skip over the \.
StrCpy $R8 $R8 "" $R6 ; Copy chars starting from the counter to the end.
StrCpy $R6 -1 ; Reset the counter to -1 so it will start over at 0.
GoTo loop_GetLongPath
end_GetLongPath:
+ ; If there is a trailing slash remove it
+ StrCmp $R9 "" +4 +1
+ StrCpy $R8 "$R9" "" -1
+ StrCmp $R8 "\" +1 +2
+ StrCpy $R9 "$R9" -1
+
ClearErrors
Pop $R4
Pop $R5
Pop $R6
Pop $R7
Pop $R8
Exch $R9