On Sunday 16 Jun 2002 7:04 pm, Uwe Bonnes wrote:
I find only two calls to DRIVE_FindDriveRoot("find -type f -name *.c |xargs grep DRIVE_FindDriveRoot") and in both cases we have an absolute path ( returned from cwd() or checked for a slash as the first character). So I think we can live with DRIVE_FindDriveRoot being imperfect, as long as long as with return a leading slash. But if you have a better solution, please let me test.
Ok, here's the same thing but moved to DIR_Init:
Index: files/directory.c =================================================================== RCS file: /home/wine/wine/files/directory.c,v retrieving revision 1.48 diff -u -r1.48 directory.c --- files/directory.c 31 May 2002 23:06:47 -0000 1.48 +++ files/directory.c 17 Jun 2002 14:53:07 -0000 @@ -103,6 +103,7 @@ } else { + if (cwd > path && *(cwd - 1) == '/') cwd--; DRIVE_SetCurrentDrive( drive ); DRIVE_Chdir( drive, cwd ); }