Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-17 23:26:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-17 23:27:27 +0300
commita9dbaf3755ac1abad109970e0fff190bb7418ac2 (patch)
tree7c3382bd34b97cfb6a41d4065a6b6cd8fca2c1cc /source/blender/blenlib/intern/storage.c
parente089b0e91162fb0932bdb88e9905cdd9fb6b94dd (diff)
Ensure BLI_stat() return value is checked.
also add function attrs on BLI_fileops to ensure they're used correctly.
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r--source/blender/blenlib/intern/storage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index c6b65171478..46c5a11949c 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -253,8 +253,9 @@ static void bli_builddir(struct BuildDirCtx *dir_ctx, const char *dirname)
file->relname = dlink->name;
file->path = BLI_strdupcat(dirname, dlink->name);
BLI_join_dirfile(fullname, sizeof(fullname), dirname, dlink->name);
- BLI_stat(fullname, &file->s);
- file->type = file->s.st_mode;
+ if (BLI_stat(fullname, &file->s) != -1) {
+ file->type = file->s.st_mode;
+ }
file->flags = 0;
dir_ctx->nrfiles++;
file++;