From 7bc6fbf158556331e247b714f874b919b9af9ae7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Jan 2015 16:58:02 +0100 Subject: 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! --- source/blender/editors/space_file/filesel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_file/filesel.c') diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 815faa1c223..c452f2e1ff4 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -669,7 +669,7 @@ int autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v)) AutoComplete *autocpl = UI_autocomplete_begin(str, FILE_MAX); while ((de = readdir(dir)) != NULL) { - if (STREQ(de->d_name, ".") || STREQ(de->d_name, "..")) { + if (FILENAME_IS_CURRPAR(de->d_name)) { /* pass */ } else { -- cgit v1.2.3