mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-07 15:25:54 +00:00
Updated file validation
This commit is contained in:
@@ -717,7 +717,8 @@ string SetReservedIds(const string& ids)
|
||||
|
||||
bool IsValidFilename(const string& filename)
|
||||
{
|
||||
return filename != "." && filename != "..";
|
||||
struct stat st;
|
||||
return !stat(filename.c_str(), &st) && S_ISREG(st.st_mode);
|
||||
}
|
||||
|
||||
bool CreateImage(int fd, const PbCommand& command)
|
||||
|
Reference in New Issue
Block a user