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

Function IsNameUsable

Libraries/unrar/pathfn.cpp:418–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416
417
418bool IsNameUsable(const wchar *Name)
419{
420#ifndef _UNIX
421 if (Name[0] && Name[1] && wcschr(Name+2,':')!=NULL)
422 return false;
423 for (const wchar *s=Name;*s!=0;s++)
424 {
425 if ((uint)*s<32)
426 return false;
427 if ((*s==' ' || *s=='.') && IsPathDiv(s[1]))
428 return false;
429 }
430#endif
431 return *Name!=0 && wcspbrk(Name,L"?*<>|\"")==NULL;
432}
433
434
435void MakeNameUsable(char *Name,bool Extended)

Callers 1

ExtrCreateFileMethod · 0.85

Calls 1

IsPathDivFunction · 0.85

Tested by

no test coverage detected