From 8ebcd48eaf253f8980b79986295453425a25360d Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 25 Sep 2022 15:50:49 +0200 Subject: [PATCH] - --- steam-workshop-download | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/steam-workshop-download b/steam-workshop-download index 2ff5d97..83ee6c1 100755 --- a/steam-workshop-download +++ b/steam-workshop-download @@ -55,11 +55,16 @@ for item in response.json()['response']['publishedfiledetails']: response = session.get(item['file_url'], stream=True) response.raise_for_status() + # one chunk at a time with open(target_path, 'wb') as file: for chunk in response.iter_content(chunk_size=65_536): print('.', end='', flush=True) if chunk: file.write(chunk) + # update modify time print(' done', flush=True) utime(target_path, (getatime(target_path), item['time_updated'])) + +# close session +session.close()