diff --git a/gpx2html/__init__.py b/gpx2html/__init__.py index 8f865ec..9d5d8b7 100755 --- a/gpx2html/__init__.py +++ b/gpx2html/__init__.py @@ -124,9 +124,10 @@ class Gpx2Html(object): self.update() def update(self): - infiles = glob.glob(os.path.join(self.infolder, '*.gpx')) - for filename in infiles: - self.tracks.add(filename) + for root, _, files in os.walk(self.infolder): + for name in files: + if name.endswith(".gpx"): + self.tracks.add(os.path.join(root, name)) self.logger.info("Begin update of png's/html...") distances = list()