mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Slight modifications to path name translation handling for Cygwin.
FossilOrigin-Name: 33ba1f4c5dc2ef8292adf17a32ade0cde0887d88
This commit is contained in:
16
src/os_win.c
16
src/os_win.c
@@ -17,6 +17,7 @@
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <sys/cygwin.h>
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -4530,13 +4531,20 @@ static int winFullPathname(
|
||||
** one by prepending the data directory and a slash.
|
||||
*/
|
||||
char zOut[SQLITE_WIN32_MAX_PATH+1];
|
||||
memset(zOut, 0, SQLITE_WIN32_MAX_PATH+1);
|
||||
cygwin_conv_path(CCP_POSIX_TO_WIN_A|CCP_RELATIVE, zRelative, zOut,
|
||||
SQLITE_WIN32_MAX_PATH+1);
|
||||
if( cygwin_conv_path(CCP_POSIX_TO_WIN_A|CCP_RELATIVE, zRelative, zOut,
|
||||
SQLITE_WIN32_MAX_PATH+1)<0 ){
|
||||
winLogError(SQLITE_CANTOPEN_FULLPATH, (DWORD)errno, "cygwin_conv_path",
|
||||
zRelative);
|
||||
return SQLITE_CANTOPEN_FULLPATH;
|
||||
}
|
||||
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s\\%s",
|
||||
sqlite3_data_directory, zOut);
|
||||
}else{
|
||||
cygwin_conv_path(CCP_POSIX_TO_WIN_A, zRelative, zFull, nFull);
|
||||
if( cygwin_conv_path(CCP_POSIX_TO_WIN_A, zRelative, zFull, nFull)<0 ){
|
||||
winLogError(SQLITE_CANTOPEN_FULLPATH, (DWORD)errno, "cygwin_conv_path",
|
||||
zRelative);
|
||||
return SQLITE_CANTOPEN_FULLPATH;
|
||||
}
|
||||
}
|
||||
return SQLITE_OK;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user