File selector dialog: long file extension filtering does not work #92610

Open
opened 2021-10-29 14:02:17 +02:00 by Thomas Lachmann · 10 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Intel(R) HD Graphics 615 Intel 4.5.0 - Build 27.20.100.8854

Blender Version
Broken:
version: 3.0.0 Beta, branch: master, commit date: 2021-10-27 22:07, hash: b838eaf2b9
version: 2.93.5, branch: master, commit date: 2021-10-05 12:04, hash: a791bdabd0
Worked: probably never

Short description of error
If you try to filter files inside the file selector with filter_glob, this only works for extensions with a max. length of 15 chars including *.

Because today some file extensions are much longer, I would suggest to increase the maximum allowed file extension length.

Exact steps for others to reproduce the error
Create a file with the extension .12345678901234567890
Load the attached script and navigfate to the folder where you created the file.
It will not displayed in the file selector.
Screenshot.PNG
operator_file_import_test.py

Solution
In path_util.c in the function BLI_path_extension_check_glob the search pattern is limited to 16 chars.
I would suggest to increase this value to 33 chars.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: Intel(R) HD Graphics 615 Intel 4.5.0 - Build 27.20.100.8854 **Blender Version** Broken: version: 3.0.0 Beta, branch: master, commit date: 2021-10-27 22:07, hash: `b838eaf2b9` version: 2.93.5, branch: master, commit date: 2021-10-05 12:04, hash: `a791bdabd0` Worked: probably never **Short description of error** If you try to filter files inside the file selector with filter_glob, this only works for extensions with a max. length of 15 chars including `*.` Because today some file extensions are much longer, I would suggest to increase the maximum allowed file extension length. **Exact steps for others to reproduce the error** Create a file with the extension `.12345678901234567890` Load the attached script and navigfate to the folder where you created the file. It will not displayed in the file selector. ![Screenshot.PNG](https://archive.blender.org/developer/F11596771/Screenshot.PNG) [operator_file_import_test.py](https://archive.blender.org/developer/F11596645/operator_file_import_test.py) **Solution** In [path_util.c ](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/intern/path_util.c) in the function `BLI_path_extension_check_glob` the search pattern is limited to 16 chars. I would suggest to increase this value to 33 chars.

Added subscriber: @Lachi

Added subscriber: @Lachi
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

@Lachi - Because today some file extensions are much longer…

Could you include some real-world examples of some that are longer? The longest I’ve seen anywhere are “crdownload”, “psppalette”, “symboliclink”, “vbox-extpack”, “witness-campaign”

> @Lachi - Because today some file extensions are much longer… Could you include some real-world examples of some that are longer? The longest I’ve seen anywhere are “crdownload”, “psppalette”, “symboliclink”, “vbox-extpack”, “witness-campaign”

In #92610#1244313, @Harley wrote:

@Lachi - Because today some file extensions are much longer…

Could you include some real-world examples of some that are longer? The longest I’ve seen anywhere are “crdownload”, “psppalette”, “symboliclink”, “vbox-extpack”, “witness-campaign”

I've an inhouse appilcation here where the file extension is .ILDRenderOptimization.
But I've also found a workaround, so I guess this could be closed.

> In #92610#1244313, @Harley wrote: >> @Lachi - Because today some file extensions are much longer… > > Could you include some real-world examples of some that are longer? The longest I’ve seen anywhere are “crdownload”, “psppalette”, “symboliclink”, “vbox-extpack”, “witness-campaign” I've an inhouse appilcation here where the file extension is .ILDRenderOptimization. But I've also found a workaround, so I guess this could be closed.

Added subscriber: @mont29

Added subscriber: @mont29

@Harley please only tag a specific release if it is either a regression from previous release, or well known-and-agreed to be worked on said release. Also filebrowser is not #core, but #pipeline_assets_i_o

@Harley please only tag a specific release if it is either a regression from previous release, or well known-and-agreed to be worked on said release. Also filebrowser is not #core, but #pipeline_assets_i_o
Member

@mont29 - please only tag a specific release...

I didn't set or change any tags here. That was OP.

> @mont29 - please only tag a specific release... I didn't set or change any tags here. That was OP.

@Harley woops, my bad... Then @Lachi please do not do any specific triaging/tagging/etc. on a report, unless you are absolutely sure to be doing the right thing. This is the job of the triaging and/or dev team.

@Harley woops, my bad... Then @Lachi please do not do any specific triaging/tagging/etc. on a report, unless you are absolutely sure to be doing the right thing. This is the job of the triaging and/or dev team.

In #92610#1245882, @mont29 wrote:
@Harley woops, my bad... Then @Lachi please do not do any specific triaging/tagging/etc. on a report, unless you are absolutely sure to be doing the right thing. This is the job of the triaging and/or dev team.

sure, I will do this in the future

> In #92610#1245882, @mont29 wrote: > @Harley woops, my bad... Then @Lachi please do not do any specific triaging/tagging/etc. on a report, unless you are absolutely sure to be doing the right thing. This is the job of the triaging and/or dev team. sure, I will do this in the future

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Bastien Montagne added this to the Pipeline, Assets & IO project 2023-02-09 15:40:39 +01:00
Philipp Oeser removed the
Interest
Pipeline, Assets & IO
label 2023-02-10 08:54:07 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#92610
No description provided.