FileSpace cleanup: make ED_path_extension_type public.
[blender.git] / source / blender / editors / space_file / filelist.c
index 8e1f781827a90f099a825adacfed4af2142d25dc..fc3341bfb92375cbe4f6671cd6a74d6eb4d4f0f5 100644 (file)
@@ -1925,7 +1925,8 @@ static bool file_is_blend_backup(const char *str)
        return (retval);
 }
 
-static int path_extension_type(const char *path)
+/* TODO: Maybe we should move this to BLI? On the other hand, it's using defines from spacefile area, so not sure... */
+int ED_path_extension_type(const char *path)
 {
        if (BLO_has_bfile_extension(path)) {
                return FILE_TYPE_BLENDER;
@@ -1977,12 +1978,12 @@ static int file_extension_type(const char *dir, const char *relpath)
 {
        char path[FILE_MAX];
        BLI_join_dirfile(path, sizeof(path), dir, relpath);
-       return path_extension_type(path);
+       return ED_path_extension_type(path);
 }
 
 int ED_file_extension_icon(const char *path)
 {
-       int type = path_extension_type(path);
+       const int type = ED_path_extension_type(path);
        
        switch (type) {
                case FILE_TYPE_BLENDER: