Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly handle filenames that contain "." prior to the extension. #116

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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