From bd2328392c8d2118ca43d03aee54193a35ce9e59 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 2 Aug 2026 12:30:53 +0200 Subject: Do not run rsync if no remote is configured --- src/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 750e175..2ff924d 100644 --- a/src/main.c +++ b/src/main.c @@ -1022,6 +1022,11 @@ static void ftag_sync_run_rsync(int push) const char *remote_host = ftag_config_get(FC_REMOTE_HOST); const char *remote_root = ftag_config_get(FC_REMOTE_ROOT); + if (strlen(remote_host) == 0) { + fprintf(stderr, "ftag sync: no remote_host is configured\n"); + exit(EXIT_FAILURE); + } + char remote_path[128]; strbuild(remote_path, "%s:%s/", remote_host, remote_root); char local_path[128]; -- cgit v1.2.3