Skip to content

Commit

Permalink
CPLFormFileName(): recognize '.\foo' as a relative path (relates to B…
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Dec 5, 2017
1 parent 07ff8a1 commit a6da4ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion port/cpl_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ const char *CPLFormFilename( const char * pszPath,
CPLAssert( ! ( pszBasename >= pszStaticResult
&& pszBasename < pszStaticResult + CPL_PATH_BUF_SIZE ) );

if( pszBasename[0] == '.' && pszBasename[1] == '/' )
if( pszBasename[0] == '.' && (pszBasename[1] == '/' || pszBasename[1] == '\\') )
pszBasename += 2;

const char *pszAddedPathSep = "";
Expand Down

0 comments on commit a6da4ab

Please sign in to comment.