Ensure BLI_stat() return value is checked.

also add function attrs on BLI_fileops to ensure they're used correctly.
This commit is contained in:
2015-02-18 07:26:10 +11:00
parent e089b0e911
commit a9dbaf3755
6 changed files with 51 additions and 38 deletions

View File

@@ -376,7 +376,7 @@ int checkPackedFile(const char *filename, PackedFile *pf)
BLI_strncpy(name, filename, sizeof(name));
BLI_path_abs(name, G.main->name);
if (BLI_stat(name, &st)) {
if (BLI_stat(name, &st) == -1) {
ret_val = PF_NOFILE;
}
else if (st.st_size != pf->size) {