Skip to content

Commit

Permalink
Merge pull request #116 from ShaheedHaque/dev
Browse files Browse the repository at this point in the history
Correctly handle filenames that contain "." prior to the extension.
  • Loading branch information
chfw authored Nov 9, 2024
2 parents 1bd673a + 4891cc9 commit 1d81ae2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change log
================================================================================

0.6.7 - unreleased
--------------------------------------------------------------------------------

#. `#115 <https://github.com/pyexcel/pyexcel-io/issues/115>`_: Pathnames with
"." cause file_name error in get_writer.

0.6.6 - 31.1.2022
--------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion pyexcel_io/writers/csv_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(

def get_writer(self):
if self._sheet_name != constants.DEFAULT_SHEET_NAME:
names = self._native_book.split(".")
names = self._native_book.rsplit(".", 1)
file_name = "%s%s%s%s%s.%s" % (
names[0],
constants.DEFAULT_MULTI_CSV_SEPARATOR,
Expand Down

0 comments on commit 1d81ae2

Please sign in to comment.