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()