| 416 | |
| 417 | |
| 418 | bool 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 | |
| 435 | void MakeNameUsable(char *Name,bool Extended) |
no test coverage detected