diff --git a/source/get_github_file.py b/source/get_github_file.py index 0268474..86d221b 100644 --- a/source/get_github_file.py +++ b/source/get_github_file.py @@ -6,8 +6,10 @@ root = "https://raw.githubusercontent.com/Faraphel/MKWF-Install/master/" def get_github_file(self, file): try: - if os.path.exists(file): return 1 dl = requests.get(root+file, allow_redirects=True, stream=True) + if os.path.exists(file): + if int(dl.headers['Content-Length']) == os.path.getsize(file): + return 1 if dl.status_code == 200: # if page is found with open(file, "wb") as file: