Added support for large field values (up to 4 GB), async and direct I/O on Linux and Solaris, and performed major code cleanup.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@213 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -381,7 +381,7 @@ FLMEXP RCODE FLMAPI f_pathReduce(
|
||||
|
||||
// Check for valid path pointers
|
||||
|
||||
if( !pszPath || !pszDir)
|
||||
if( !pszPath)
|
||||
{
|
||||
rc = RC_SET( FERR_INVALID_PARM);
|
||||
goto Exit;
|
||||
@@ -427,30 +427,33 @@ FLMEXP RCODE FLMAPI f_pathReduce(
|
||||
|
||||
// Copy the reduced source path to the dir path
|
||||
|
||||
if (pszFileNameStart > pszPath)
|
||||
if( pszDir)
|
||||
{
|
||||
uiLen = (FLMUINT)(pszFileNameStart - pszPath);
|
||||
f_memcpy( pszDir, pszPath, uiLen);
|
||||
|
||||
if (uiLen >= 2 && f_isSlashSeparator( pszDir [uiLen - 1])
|
||||
#ifndef FLM_UNIX
|
||||
&& pszDir [uiLen - 2] != ':'
|
||||
#endif
|
||||
)
|
||||
if (pszFileNameStart > pszPath)
|
||||
{
|
||||
// Trim off the trailing path separator
|
||||
uiLen = (FLMUINT)(pszFileNameStart - pszPath);
|
||||
f_memcpy( pszDir, pszPath, uiLen);
|
||||
|
||||
pszDir [uiLen - 1] = 0;
|
||||
if (uiLen >= 2 && f_isSlashSeparator( pszDir [uiLen - 1])
|
||||
#ifndef FLM_UNIX
|
||||
&& pszDir [uiLen - 2] != ':'
|
||||
#endif
|
||||
)
|
||||
{
|
||||
// Trim off the trailing path separator
|
||||
|
||||
pszDir [uiLen - 1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pszDir [uiLen] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pszDir [uiLen] = 0;
|
||||
*pszDir = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*pszDir = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -460,8 +463,11 @@ FLMEXP RCODE FLMAPI f_pathReduce(
|
||||
{
|
||||
f_strcpy( pszPathComponent, pszPath);
|
||||
}
|
||||
|
||||
*pszDir = 0;
|
||||
|
||||
if( pszDir)
|
||||
{
|
||||
*pszDir = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Exit:
|
||||
|
||||
Reference in New Issue
Block a user