Commit: beb6399ae5971fdbbf8aa6eb8832200afabeb97d Author: Leon Zandman Date: Thu Jun 24 19:03:51 2021 +0200 Branches: master https://developer.blender.org/rBbeb6399ae5971fdbbf8aa6eb8832200afabeb97d
Fix T89129: file dialog displays in-progress Safari downloads as a folder In-progress Safari download files/packages are now recognized as bundles and therefore not treated as directories. Differential Revision: https://developer.blender.org/D11613 =================================================================== M source/blender/editors/space_file/filelist.c M source/blender/makesdna/DNA_space_types.h =================================================================== diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 148799067bc..40a7be0423e 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1191,7 +1191,7 @@ static int filelist_geticon_ex(const FileDirEntry *file, if (FILENAME_IS_PARENT(file->relpath)) { return is_main ? ICON_FILE_PARENT : ICON_NONE; } - if (typeflag & FILE_TYPE_APPLICATIONBUNDLE) { + if (typeflag & FILE_TYPE_BUNDLE) { return ICON_UGLYPACKAGE; } if (typeflag & FILE_TYPE_BLENDER) { @@ -2519,9 +2519,16 @@ int ED_path_extension_type(const char *path) if (file_is_blend_backup(path)) { return FILE_TYPE_BLENDER_BACKUP; } - if (BLI_path_extension_check(path, ".app")) { - return FILE_TYPE_APPLICATIONBUNDLE; +#ifdef __APPLE__ + if (BLI_path_extension_check_n(path, + /* Application bundle */ + ".app", + /* Safari in-progress/paused download */ + ".download", + NULL)) { + return FILE_TYPE_BUNDLE; } +#endif if (BLI_path_extension_check(path, ".py")) { return FILE_TYPE_PYSCRIPT; } @@ -2815,7 +2822,7 @@ static int filelist_readjob_list_dir(const char *root, entry->attributes = BLI_file_attributes(full_path); if (S_ISDIR(files[i].s.st_mode) #ifdef __APPLE__ - && !(ED_path_extension_type(full_path) & FILE_TYPE_APPLICATIONBUNDLE) + && !(ED_path_extension_type(full_path) & FILE_TYPE_BUNDLE) #endif ) { entry->typeflag = FILE_TYPE_DIR; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 7804ece9769..2b9a4f7ba1d 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1019,7 +1019,7 @@ typedef enum eFileSel_File_Types { FILE_TYPE_COLLADA = (1 << 13), /** from filter_glob operator property */ FILE_TYPE_OPERATOR = (1 << 14), - FILE_TYPE_APPLICATIONBUNDLE = (1 << 15), + FILE_TYPE_BUNDLE = (1 << 15), FILE_TYPE_ALEMBIC = (1 << 16), /** For all kinds of recognized import/export formats. No need for specialized types. */ FILE_TYPE_OBJECT_IO = (1 << 17), _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs