mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +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)
|
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)
|
bool CreateImage(int fd, const PbCommand& command)
|
||||||
|
Loading…
Reference in New Issue
Block a user