>>
>>Better to use FULLPATH(CURDIR()); SYS(5) doesn't work with UNCs.
>>
>>>
>Well, well. There's a function I never used, although I am fully aware of its existance. I'm sure you're right about that Ed. :)
It's actually an interesting problem, and is mostly an issue with Novell servers. If I'm using an MS Network client, and I say:
CD \\NTSERVER4\D_Share\WorkDir
SYS(5) returns "\\NTSERVER\D_Share", the UNC in \\MachineName\PathName format, and CURDIR() returns "\WorkDir\". IOW, it works OK via the Client for Microsoft Networks on a consistent basis. However, NetWare with certain clients creates problems, because it allows you to map anywhere in the netowrk path as a root drive, so:
CD \\NOVSERV1\VOL1\WorkDir
isn't sure if it should resolve the resulting path from the UNC as a drive "\\NOVSERV1\VOL1" with a CURDIR() of "\WorkDir\", or a drive of "\\NOVSERV1\VOL1\WorkDir", with a CURDIR() of "\". With some NetWare clients and some versions of VFP, the result is a SYS(5) return of "\:", completely unhelpful. Using the alternative FULLPATH(CURDIR()) really doesn't care how CURDIR() is resolved, FULLPATH() will take a relative path and resolve it to a fully qualified path unambiguously.