MCPcopy Index your code
hub / github.com/MapServer/MapServer / msTryBuildPath

Function msTryBuildPath

mapstring.c:721–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719*/
720
721char *msTryBuildPath(char *szReturnPath, const char *abs_path, const char *path)
722
723{
724 FILE *fp;
725
726 if( msBuildPath( szReturnPath, abs_path, path ) == NULL )
727 return NULL;
728
729 fp = fopen( szReturnPath, "r" );
730 if( fp == NULL )
731 {
732 strlcpy( szReturnPath, path, MS_MAXPATHLEN);
733 return NULL;
734 }
735 else
736 fclose( fp );
737
738 return szReturnPath;
739}
740
741/*
742** Similar to msBuildPath3(), but the input path is only qualified by the

Callers 2

msOGRFileOpenFunction · 0.85
msDrawRasterLayerLowFunction · 0.85

Calls 2

msBuildPathFunction · 0.85
strlcpyFunction · 0.85

Tested by

no test coverage detected