Talk:StrRep: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
c:\\test\\myfile.exe | c:\\test\\myfile.exe | ||
: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: | |||
${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 ":". | |||
-[[User:66.161.150.58|66.161.150.58]] 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 ":".
-66.161.150.58 10:36, 8 July 2006 (PDT)