From 0ad8fcbacf7d10a401518c1b976d525709ee0cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 23 Dec 2016 15:04:07 +0800 Subject: [PATCH] Fixed a bug when finding the module name from the file name stripping the file name extension. --- bin/obasync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/obasync b/bin/obasync index 71c9b32..1538a41 100755 --- a/bin/obasync +++ b/bin/obasync @@ -148,7 +148,7 @@ def read_in_source_dir(projdir, ext, encoding): path = os.path.join(projdir, entry) if os.path.isfile(path) \ and entry.lower().endswith(ext.lower()): - modname = entry[0:-3] + modname = entry[0:-len(ext)] modules[modname] = read_file(path, encoding) return modules