From 735515a3f9e4c41738bf714d682b13db64adb638 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2019 09:39:35 +1000 Subject: Cleanup: style, use braces for blenkernel --- source/blender/blenkernel/intern/bpath.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source/blender/blenkernel/intern/bpath.c') 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; } -- cgit v1.2.3