Talk:StrRep: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
Dandaman32 (talk | contribs) No edit summary |
Dandaman32 (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
:You should ask [[User:dandaman32|Dandaman32]] to fix it. In the mean while, you can use the [http://nsis.sourceforge.net/mediawiki/index.php?title=StrRep&oldid=8634 old version] which works perfectly fine. --[[User:Kichik|kichik]] 03:17, 19 May 2006 (PDT) | :You should ask [[User:dandaman32|Dandaman32]] to fix it. In the mean while, you can use the [http://nsis.sourceforge.net/mediawiki/index.php?title=StrRep&oldid=8634 old version] which works perfectly fine. --[[User:Kichik|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: | ::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 ":". | ::--{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:Dandaman32| | ::-[[User:Dandaman32|dandaman32]] 10:36, 8 July 2006 (PDT) |
Revision as of 17:37, 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)