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:
Diffstat (limited to 'source/blender/blenkernel/intern/bpath.c')
-rw-r--r--source/blender/blenkernel/intern/bpath.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index 25f886b815a..6f0c1891b05 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -233,21 +233,25 @@ static bool missing_files_find__recursive(char *filename_new,
dir = opendir(dirname);
- if (dir == NULL)
+ if (dir == NULL) {
return found;
+ }
- if (*r_filesize == -1)
+ if (*r_filesize == -1) {
*r_filesize = 0; /* dir opened fine */
+ }
while ((de = readdir(dir)) != NULL) {
- if (FILENAME_IS_CURRPAR(de->d_name))
+ if (FILENAME_IS_CURRPAR(de->d_name)) {
continue;
+ }
BLI_join_dirfile(path, sizeof(path), dirname, de->d_name);
- if (BLI_stat(path, &status) == -1)
+ if (BLI_stat(path, &status) == -1) {
continue; /* cant stat, don't bother with this file, could print debug info here */
+ }
if (S_ISREG(status.st_mode)) { /* is file */
if (BLI_path_ncmp(filename, de->d_name, FILE_MAX) == 0) { /* name matches */
@@ -321,8 +325,9 @@ static bool missing_files_find__visit_cb(void *userdata, char *path_dst, const c
BLI_strncpy(path_dst, filename_new, FILE_MAX);
/* keep path relative if the previous one was relative */
- if (was_relative)
+ if (was_relative) {
BLI_path_rel(path_dst, data->basedir);
+ }
return true;
}