diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-26 18:58:02 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-26 18:59:24 +0300 |
commit | 7bc6fbf158556331e247b714f874b919b9af9ae7 (patch) | |
tree | c5b3c883d6a4243f2f11bbac9306abdee07e1207 /source/blender/blenkernel/intern | |
parent | fca515838e70f8bec7028b840bb921a1be9fabbb (diff) |
Cleanup: current/parent paths: add helpers in BLI_path_utils.
Also, avoid calling ugly strcmp with '.' or '..', making direct char checks is
much cheaper here!
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/bpath.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 3cd26dacebd..e6bfd5c113c 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -228,7 +228,7 @@ static int findFileRecursive(char *filename_new, while ((de = readdir(dir)) != NULL) { - if (STREQ(".", de->d_name) || STREQ("..", de->d_name)) + if (FILENAME_IS_CURRPAR(de->d_name)) continue; BLI_join_dirfile(path, sizeof(path), dirname, de->d_name); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index a8add058590..6d1e6618b87 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2975,7 +2975,7 @@ void BKE_ptcache_remove(void) return; while ((de = readdir(dir)) != NULL) { - if (STREQ(de->d_name, ".") || STREQ(de->d_name, "..")) { + if (FILENAME_IS_CURRPAR(de->d_name)) { /* do nothing */ } else if (strstr(de->d_name, PTCACHE_EXT)) { /* do we have the right extension?*/ |