Fix uvision group naming

The previous way of finding group names found the encompassing directory of each file. If the project is exported from the online compiler, this resulted in temporary folder names like tmpyKKWv_ showing up as group names.

I propose defaulting to the project name if the file is in the project root.
pull/2659/head
sarahmarshy 2016-09-09 17:18:52 -05:00 committed by GitHub
parent 2c96001478
commit f8cae13f33
1 changed files with 2 additions and 2 deletions

View File

@ -121,8 +121,8 @@ class Exporter(object):
def make_key(src):
"""turn a source file into it's group name"""
key = os.path.basename(os.path.dirname(src))
if not key:
key = os.path.basename(os.path.normpath(self.export_dir))
if not key or relpath(key, self.export_dir) == '.':
key = self.project_name
return key
def grouped(sources):