mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-15 08:27:34 +00:00
Check for stat results
This commit is contained in:
@@ -262,8 +262,9 @@ void GetImageFile(PbImageFile *image_file, const string& filename)
|
||||
image_file->set_read_only(access(f.c_str(), W_OK));
|
||||
|
||||
struct stat st;
|
||||
stat(f.c_str(), &st);
|
||||
image_file->set_size(st.st_size);
|
||||
if (!stat(f.c_str(), &st)) {
|
||||
image_file->set_size(st.st_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user