From cbebddb1e856c74887cefeae03566b73fb19c1f3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 20 Feb 2022 09:37:10 +0100 Subject: bin/zathura_wrapper: flush the temporary file after writing --- bin/zathura_wrapper | 1 + 1 file changed, 1 insertion(+) 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)) -- cgit v1.2.3