mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-23 21:29:30 +00:00
Updated file validation
This commit is contained in:
parent
7a1a2ec328
commit
9663144c45
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user