From f3a102b4eb6f874f5f4f6965ce3a67d02dc24331 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 25 Nov 2024 03:40:47 +0100
Subject: [PATCH] For sync script, download remote DB temporarily into
 PATH_TEMP.

---
 src/sync.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sync.py b/src/sync.py
index fb02e05..27980cd 100755
--- a/src/sync.py
+++ b/src/sync.py
@@ -11,7 +11,7 @@ from urllib.request import urlopen
 from paramiko import SSHClient  # type: ignore
 from scp import SCPClient  # type: ignore
 from ytplom.misc import (
-        PATH_DB, PATH_DOWNLOADS,
+        PATH_DB, PATH_DOWNLOADS, PATH_TEMP,
         DatabaseConnection, PathStr, QueryId, QuotaLog, VideoFile,
         YoutubeQuery, YoutubeVideo)
 
@@ -28,7 +28,7 @@ RowData: TypeAlias = tuple[str,
 RelationData: TypeAlias = tuple[str, list[YoutubeVideo], DatabaseConnection]
 
 
-PATH_DB_REMOTE = PathStr('remote_db.sql')
+PATH_DB_REMOTE = PathStr(path_join(PATH_TEMP, 'remote_db.sql'))
 URL_MISSING_JSON = f'http://{YTPLOM_REMOTE}:{YTPLOM_PORT}/missing.json'
 
 
-- 
2.30.2