Talk:StrRep: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
Dandaman32 (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
--{FOO BAR}-- is just a temporary replacement for "\". It could be any text you like, just make sure it's something that won't already be in the string, like "/" or ":". | --{FOO BAR}-- is just a temporary replacement for "\". It could be any text you like, just make sure it's something that won't already be in the string, like "/" or ":". | ||
-[[User: | -[[User:Dandaman32|Dandaman32]] 10:36, 8 July 2006 (PDT) |
Revision as of 17:36, 8 July 2006
Hello, there is a bug when i replace '\' by '\\' like : c:\test\myfile.exe AFTER STRREPLACE c:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.... instead of c:\\test\\myfile.exe
- You should ask Dandaman32 to fix it. In the mean while, you can use the old version which works perfectly fine. --kichik 03:17, 19 May 2006 (PDT)
This is a known bug, and I'm not totally sure how to fix it. The bug is triggered when your replacement string contains the entire search string, i.e. ${StrReplace} $VAR "\" "\\" $VAR. I'm still trying to fix this, in the meantime, try this:
${StrReplace} $VAR "\" "--{FOO BAR}--" $VAR ${StrReplace} $VAR "--{FOO BAR}--" "\\" $VAR
--{FOO BAR}-- is just a temporary replacement for "\". It could be any text you like, just make sure it's something that won't already be in the string, like "/" or ":".
-Dandaman32 10:36, 8 July 2006 (PDT)