UNC Paths

Frank Warmerdam fwarmerdam at GMAIL.COM
Thu Feb 3 11:56:49 EST 2005


On Thu, 3 Feb 2005 11:03:46 -0500, Dan Phillips
<danp at americanclearinghouse.com> wrote:
> Hello,
>
> I've just installed Mapserver on Windows XP and would like to use UNC in my
> OGR Connection (e.g. "//HP_SERVER/RDRIVE/STREETS/STREETS.TAB") to reference
> the map data rather than use mapped drives (e.g. "R:/STREETS/STREETS.TAB").
> I'm getting the error:

Dan,

Are you supposed to use backslashes in those network redirectors?

Like "\\HP_SERVER\RDRIVE\STREETS\STREETS.BAT"?

I don't normally use that mechanism myself, so I did a little test.  I
compiled the following program:

#include <stdio.h>

int main()

{
    const char *pszFilename = "\\\\gdal\\warmerda\\.cshrc";
    FILE *fp = fopen( pszFilename, "t" );

    if( fp == NULL )
        perror( pszFilename );
    else
        printf( "Success!\n" );
}

When I run it, I get a NULL "fp" from fopen, but there does not seem
to be any error reported by perror().  I'm not sure exactly what to make
of there being no errno value set, but as I get fp back, it does seem that
fopen() does not support this style of network redirector.

I would add that "type \\gdal\warmerda\.cshrc" worked fine for me at the
CMD.EXE prompt.

So, if fopen() does not support these redirectors, then neither will OGR
or most other MapServer components.

Of course, I'm not particularly savvy about win32 type stuff, so I might
be missing something.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list