bpy.path.ensure_ext adds extension twice / extra period if filename empty, just a period or equal to extension #33876

Closed
opened 2013-01-15 01:37:49 +01:00 by CodeManX · 3 comments
Member

%%%--- Operating System, Graphics card ---
Windows 7

- Blender version with error, and version that worked ---

r53787

- Short description of error ---

ensure_ext, which is used by io_utils, behaves incorrectly on certain file names:

Examples:

filename "" -> .obj (click somewhere and it will turn into .obj.obj)

filename "." -> ..obj (click -> ..obj.obj)

filename ".obj" -> .obj.obj

patch attached!

please test on linux/mac.%%%

%%%--- Operating System, Graphics card --- Windows 7 - Blender version with error, and version that worked --- r53787 - Short description of error --- ensure_ext, which is used by io_utils, behaves incorrectly on certain file names: Examples: filename "" -> .obj (click somewhere and it will turn into .obj.obj) filename "." -> ..obj (click -> ..obj.obj) filename ".obj" -> .obj.obj patch attached! please test on linux/mac.%%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%fixed r53803, I've kept ensure_ext working as-is, see commit log for details.%%%

%%%fixed r53803, I've kept ensure_ext working as-is, see commit log for details.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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-addons#33876
No description provided.