From c288d54ab84f7381b7354f5ea8574b8522c547e6 Mon Sep 17 00:00:00 2001 From: Sam Parkinson Date: Thu, 14 Jul 2016 16:16:25 +1000 Subject: [PATCH] Bundlebuilder: submodules can have "/.git" as a file When created via "git submodules add", a submodules may have the "/.git" path be a file rather than a directory. The bundlebuilder previously thought that all submodules had "/.git" as a directory. --- src/sugar3/activity/bundlebuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar3/activity/bundlebuilder.py b/src/sugar3/activity/bundlebuilder.py index 25819f61..ae70b695 100644 --- a/src/sugar3/activity/bundlebuilder.py +++ b/src/sugar3/activity/bundlebuilder.py @@ -205,7 +205,7 @@ class Packager(object): if not ignore: sub_path = os.path.join(root, line) if os.path.isdir(sub_path) \ - and os.path.isdir(os.path.join(sub_path, '.git')): + and os.path.exists(os.path.join(sub_path, '.git')): sub_list = self.get_files_in_git(sub_path) for f in sub_list: files.append(os.path.join(line, f))