mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Check for stat results
This commit is contained in:
parent
e99db83750
commit
b0bc2d6261
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user