From 15602ce059c668e4fe973bec588fca94a2e081c7 Mon Sep 17 00:00:00 2001 From: DennisOchulor <113277083+DennisOchulor@users.noreply.github.com> Date: Thu, 29 Jan 2026 16:37:11 +0800 Subject: [PATCH] fix: importing packages with scripts that have "." in the script name (#35784) * fix: importing packages with scripts that have "." in the script name * style: code formatting --- frappe/modules/import_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/modules/import_file.py b/frappe/modules/import_file.py index eb8f53d0b6..e0f9abe2ad 100644 --- a/frappe/modules/import_file.py +++ b/frappe/modules/import_file.py @@ -248,7 +248,7 @@ def load_code_properties(doc, path): if hasattr(doc, "get_code_fields"): dirname, filename = os.path.split(path) for key, extn in doc.get_code_fields().items(): - codefile = os.path.join(dirname, filename.split(".", 1)[0] + "." + extn) + codefile = os.path.join(dirname, filename[: filename.rfind(".")] + "." + extn) if os.path.exists(codefile): with open(codefile) as txtfile: doc.set(key, txtfile.read())