cppcheckdata: a bit better handling for windows

This commit is contained in:
Daniel Marjamäki 2022-02-23 20:40:00 +01:00
parent ef28c579bf
commit ef6bbcb6ad
1 changed files with 7 additions and 4 deletions

View File

@ -1370,8 +1370,11 @@ def reportSummary(dumpfile, summary_type, summary_data):
def get_path_premium_addon():
p = pathlib.Path(sys.argv[0]).parent.parent
p1 = os.path.join(p, 'premiumaddon')
p2 = os.path.join(p, 'cppcheck')
if os.path.isfile(p1) and os.path.isfile(p2):
return p1
for ext in ('.exe', ''):
p1 = os.path.join(p, 'premiumaddon' + ext)
p2 = os.path.join(p, 'cppcheck' + ext)
if os.path.isfile(p1) and os.path.isfile(p2):
print(p1)
return p1
return None