cwFileSys.cpp: Automatically expandPath() in dirEntries().
This commit is contained in:
parent
ddad22cde0
commit
f8e0a24032
@ -717,15 +717,16 @@ cw::filesys::dirEntry_t* cw::filesys::dirEntries( const char* dirStr, unsigned f
|
||||
deRecd_t r;
|
||||
|
||||
memset(&r,0,sizeof(r));
|
||||
//r.p = _cmFileSysHandleToPtr(h);
|
||||
r.filterFlags = filterFlags;
|
||||
|
||||
cwAssert( dirEntryCntPtr != NULL );
|
||||
*dirEntryCntPtr = 0;
|
||||
|
||||
char* inDirStr = filesys::expandPath(dirStr);
|
||||
|
||||
for(r.passIdx=0; r.passIdx<2; ++r.passIdx)
|
||||
{
|
||||
if((rc = _dirGetEntries( &r, dirStr )) != kOkRC )
|
||||
if((rc = _dirGetEntries( &r, inDirStr )) != kOkRC )
|
||||
goto errLabel;
|
||||
|
||||
if( r.passIdx == 0 && r.dataByteCnt>0 )
|
||||
@ -757,6 +758,8 @@ cw::filesys::dirEntry_t* cw::filesys::dirEntries( const char* dirStr, unsigned f
|
||||
r.rp = NULL;
|
||||
}
|
||||
|
||||
mem::release(inDirStr);
|
||||
|
||||
return r.rp;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user