8000 Merge pull request #116 from ShaheedHaque/dev · pyexcel/pyexcel-io@1d81ae2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d81ae2

Browse files
authored
Merge pull request #116 from ShaheedHaque/dev
Correctly handle filenames that contain "." prior to the extension.
2 parents 1bd673a + 4891cc9 commit 1d81ae2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change log
22
================================================================================
33

4+
0.6.7 - unreleased
5+
--------------------------------------------------------------------------------
6+
7+
#. `#115 <https://github.com/pyexcel/pyexcel-io/issues/115>`_: Pathnames with
8+
"." cause file_name error in get_writer.
9+
410
0.6.6 - 31.1.2022
511
--------------------------------------------------------------------------------
612

pyexcel_io/writers/csv_sheet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747

4848
def get_writer(self):
4949
if self._sheet_name != constants.DEFAULT_SHEET_NAME:
50-
names = self._native_book.split(".")
50+
names = self._native_book.rsplit(".", 1)
5151
file_name = "%s%s%s%s%s.%s" % (
5252
names[0],
5353
constants.DEFAULT_MULTI_CSV_SEPARATOR,

0 commit comments

Comments
 (0)
0