Bug 470797 - The GetLongPath macro returns paths with a trailing \. r=jmathies
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 06 Jan 2009 11:16:49 -0800
changeset 23376 cb62d3dff36ba4e4251f929176c17767e163c537
parent 23375 309711a732acd1ccfad3fe3d5da57a67767948de
child 23377 fc12d81653dd38c6ccedaf2d31c385a3d1ba3d4c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs470797
milestone1.9.2a1pre
Bug 470797 - The GetLongPath macro returns paths with a trailing \. r=jmathies
toolkit/mozapps/installer/windows/nsis/common.nsh
--- 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