At 01:21 PM 12/13/2002, [EMAIL PROTECTED] wrote: >I finally figured out why testnames is failing on Windows. Essentially, >the tests are using paths like "/foo/bar" for absolute paths. But, >Windows looks at this and says this isn't absolute, it is relative. IMHO, >that means that these functions are less useful than I originally thought. >I had hoped that we could pass a common string into these functions, and >the functions would handle the OS-level information. > >I realize that is hard to do with drive letters, but my question remains, >is the test wrong, or is the code wrong?????
Both. Consider this... c:/foo/bar on windows is absolute. foo/bar is relative. Now consider c:foo/bar. If you change the cwd on c:, the filename changes context. So it's relative. But it is not entirely relative, so we consider the root path incomplete. Consider /foo/bar. If you change the cwd to a different drive letter, the filename again changes context, so it's relative. But it is not entirely relative, so we consider the root path incomplete. Finally consider //mach/share/foo/bar. That path is also absolute, since we are using a unc path. Yes, the tests for this situation are platform-dependent, because as you observe, /foo/bar means different things on different platforms. Bill
