MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / GetNextMask

Method GetNextMask

Libraries/unrar/scantree.cpp:210–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210bool ScanTree::GetNextMask()
211{
212 if (!GetFilteredMask())
213 return false;
214#ifdef _WIN_ALL
215 UnixSlashToDos(CurMask,CurMask,ASIZE(CurMask));
216#endif
217
218 // We wish to scan entire disk if mask like c:\ is specified
219 // regardless of recursion mode. Use c:\*.* mask when need to scan only
220 // the root directory.
221 ScanEntireDisk=IsDriveLetter(CurMask) && IsPathDiv(CurMask[2]) && CurMask[3]==0;
222
223 wchar *Name=PointToName(CurMask);
224 if (*Name==0)
225 wcsncatz(CurMask,MASKALL,ASIZE(CurMask));
226 if (Name[0]=='.' && (Name[1]==0 || Name[1]=='.' && Name[2]==0))
227 {
228 AddEndSlash(CurMask,ASIZE(CurMask));
229 wcsncatz(CurMask,MASKALL,ASIZE(CurMask));
230 }
231 SpecPathLength=Name-CurMask;
232 Depth=0;
233
234 wcsncpyz(OrigCurMask,CurMask,ASIZE(OrigCurMask));
235
236 return true;
237}
238
239
240SCAN_CODE ScanTree::FindProc(FindData *FD)

Callers

nothing calls this directly

Calls 7

UnixSlashToDosFunction · 0.85
IsDriveLetterFunction · 0.85
IsPathDivFunction · 0.85
PointToNameFunction · 0.85
wcsncatzFunction · 0.85
AddEndSlashFunction · 0.85
wcsncpyzFunction · 0.85

Tested by

no test coverage detected