msi: make the WriteEnvironmentStrings handling of [~] a bit better
mikolajz at google.com
Wed Oct 17 19:11:27 CDT 2007
The default meaning of [~] is a NUL character but in the case of
WriteEnvironmentStrings it should represent the current value of the
variable. get_env_flags tries to handle the case of this token at the
beginning or at the end of the string but is doesn't work as it is
called after deformat_string that already changed it into a NUL. For
strings "[~];Dir" that should append Dir to the variable we clear the
variable as the first char will be a NUL. This patch changes the oder
of these calls what makes it work for Photoshop CS2.
It still won't work if [~] is in the middle of the string, there is an
extra semicolon added, there are some more bugs in
WriteEnvironmentStrings (it tries to delete a value with RegDeleteKey,
the path to user environment variables is invalid) but I've decided
not to make any bigger rewrite of this function unless I will learn to
write some regression tests for it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-patches