From b21bb9aeb5058129b69c2f26940c05061dd0e10c Mon Sep 17 00:00:00 2001 From: Caleb Johnson Date: Sat, 17 Mar 2018 09:57:47 -0500 Subject: [PATCH] [Downloader] Only show updates for cog .py files (#1316) --- cogs/downloader.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cogs/downloader.py b/cogs/downloader.py index 58d8a1767..a84858a83 100644 --- a/cogs/downloader.py +++ b/cogs/downloader.py @@ -654,7 +654,13 @@ class Downloader: continue status, _, cogpath = f.partition('\t') - cogname = os.path.split(cogpath)[-1][:-3] # strip .py + split = os.path.split(cogpath) + cogdir, cogname = split[-2:] + cogname = cogname[:-3] # strip .py + + if len(split) != 2 or cogdir != cogname: + continue + if status not in ret: ret[status] = [] ret[status].append(cogname)