From 65b1474cadb7f9b7401405456c62512d366ae329 Mon Sep 17 00:00:00 2001 From: Ron Ulitsky <58720766+ron-ulitsky@users.noreply.github.com> Date: Thu, 19 May 2022 14:29:36 -0500 Subject: [PATCH] Update importer.py fixed bug that returned incorrect extensions for file paths with directories containing full stops --- frappe/core/doctype/data_import/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/data_import/importer.py b/frappe/core/doctype/data_import/importer.py index 9a801cfc19..a9e23a987d 100644 --- a/frappe/core/doctype/data_import/importer.py +++ b/frappe/core/doctype/data_import/importer.py @@ -574,7 +574,7 @@ class ImportFile: ###### def read_file(self, file_path): - extn = file_path.split(".")[1] + extn = os.path.splitext(file_path)[1][1:] file_content = None with io.open(file_path, mode="rb") as f: