Fix cross-device links development
authorAlex Chan <alex@alexwlchan.net>
Sat, 28 Nov 2020 23:49:45 +0000 (23:49 +0000)
committerAlex Chan <alex@alexwlchan.net>
Sat, 28 Nov 2020 23:49:45 +0000 (23:49 +0000)
download_overcast_podcasts.py

index b6f2bfb..1b69012 100755 (executable)
@@ -183,10 +183,10 @@ def download_url(*, url, path, description):
     else:
         print(f"Downloading {description} successful!")
         try:
-            os.rename(local_filename, out_path)
+            os.rename(tmp_path, path)
         except OSError as err:
             if err.errno == errno.EXDEV:
-                shutil.move(local_filename, out_path)
+                shutil.move(tmp_path, path)
             else:
                 raise