Simplified filename validation

This commit is contained in:
Uwe Seimet 2021-09-17 20:14:03 +02:00
parent 5b3af7cf9d
commit ad0e454e66

View File

@ -717,10 +717,6 @@ string SetReservedIds(const string& ids)
bool IsValidFilename(const string& filename)
{
if (filename == "." || filename == "..") {
return false;
}
struct stat st;
return stat(filename.c_str(), &st) || !S_ISREG(st.st_mode);
}