diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-02-20 09:37:10 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-02-20 09:37:10 +0100 |
commit | cbebddb1e856c74887cefeae03566b73fb19c1f3 (patch) | |
tree | d36a21ab5f935e781a081835a71629dc79bb5d53 | |
parent | 08731d77d1f2ebe53510a7c12d590eb1d7280fd4 (diff) |
bin/zathura_wrapper: flush the temporary file after writing
-rwxr-xr-x | bin/zathura_wrapper | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/zathura_wrapper b/bin/zathura_wrapper index d007510..f9202c2 100755 --- a/bin/zathura_wrapper +++ b/bin/zathura_wrapper @@ -22,6 +22,7 @@ with contextlib.ExitStack() as stack: try: resp = urllib.request.urlopen(args[-1]) shutil.copyfileobj(resp, tf) + tf.flush() args[-1] = tf.name except urllib.error.URLError as e: sys.stderr.write('Error downloading the URL "%s" to a temporary file\n', str(e)) |