On Friday 14 Jun 2002 6:20 pm, Uwe Bonnes wrote:
some application (xilinx webpack) dind't find it's initialisation file when started in the debugger ("winedbg bin/nt/webpack.exe" versus "wine bin/nt/exepack" started in "l:/xilinx"). As trap there is also a directory "l:/xilinx/xilinx". The starting process (wine or winedbg) set the current working directory to l: and when winedbg started the user process, DRIVE_Chdir in DIR_Init set the current directory to "l:/xilinx/xilinx". This was caused by DRIVE_FindDriveRoot not returning an absolute path.
I'm sorry about that, I should have forseen it. Your patch does of course fix it (and that's how it was before) but I think it might be better to make the change to DIR_Init() instead though.
I think the trouble with trying to return the leading slash in the result of DRIVE_FindDriveRoot() is that whether you get an absolute or relative path depends on whether we are at a drive's root or not, rather than whether the input unix path is absolute or not.
So since DRIVE_FindDriveRoot() can't always do it correctly I think it would probably be better if it didn't do it at all, that way the caller knows they have to deal with it rather than it working some of the time, but other times giving rise subtle problems.