argv[0] needs to be an absolute path

Dan Kegel dank at kegel.com
Thu Jan 2 12:27:43 CST 2003


"sometimes" == "if the program was invoked with a relative path"

BTW the one-line patch I submitted seems to just preserve
the D: in the example I gave.  This is good enough to make
my test case work, but won't fix all uses, I think.
- Dan

Sylvain Petreolle wrote:
> What do you mean by "sometimes" ?
> 
> 
>>outputs an absolute path on Windows, but sometimes
>>outputs a relative path on Wine.  This causes the
>>commandline
>>   $ wine d:setup
>>to fail to find its files properly if it uses the
>>basename of argv[0].  One example of this is msvc4.0
>>(although it only tries this if an earlier method fails,
>>so there's another bug lurking).
>>
>>I am about to submit a one-line patch to fix this to
>>wine-patches.  (If I weren't a wimp, I'd figure out
>>a way to submit a regression test, too, although
>>it'd be a strange one; most of our tests don't need
>>to invoke Wine itself from the Unix commandline!)
>>
>>The same problem exists for programs launched from other
>>wine programs, e.g. from inside wcmd.
>>That's another code path, and I couldn't find a
>>one-line fix for that one.
>>- Dan



-- 
Dan Kegel
Linux User #78045
http://www.kegel.com




More information about the wine-devel mailing list