Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/modules/bpy_extras/io_utils.py')
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 19697b25f70..7eb9b2aa347 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -94,13 +94,11 @@ class ExportHelper:
if check_extension is not None:
filepath = self.filepath
if os.path.basename(filepath):
- filepath = bpy.path.ensure_ext(
- filepath,
- self.filename_ext
- if check_extension
- else "",
- )
-
+ if check_extension:
+ filepath = bpy.path.ensure_ext(
+ os.path.splitext(filepath)[0],
+ self.filename_ext,
+ )
if filepath != self.filepath:
self.filepath = filepath
change_ext = True