Skip to content

fix for the get_config_files

Damien Naudet requested to merge fix_cfg into master

Using relpath instead of lstrip.

If the config is in c:\blissadm\config\falconx, and we have two files falconx8_A.ini and ./ff/falconx8_B.ini

>> path = C:\\blissadm\\config\\falconx\\
>> sep = '/'
>> ext = '.ini'
>> [os.path.join(dp, f).lstrip(path).lstrip(sep)
            for dp, dn, fn in os.walk(path)
            for f in fn
            if f.endswith(ext)]

['8_A.ini', '8_B.ini']
>> [os.path.relpath(os.path.join(dp, f), path).lstrip(sep)
            for dp, dn, fn in os.walk(path)
            for f in fn
            if f.endswith(ext)]

['falconx8_A.ini', 'ff\\falconx8_B.ini']

Merge request reports