From 751b187df6d17324ab0f4f17b9e72b68943b7032 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 13 Nov 2021 22:50:14 +0100 Subject: [PATCH] fix: check local path exists See https://git.coopcloud.tech/coop-cloud/organising/issues/245. --- cli/app/cp.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/app/cp.go b/cli/app/cp.go index 201b8947..7d2f09fe 100644 --- a/cli/app/cp.go +++ b/cli/app/cp.go @@ -76,6 +76,12 @@ And if you want to copy that file back to your current working directory locally logrus.Debugf("assuming transfer is going TO the container") } + if !isToContainer { + if _, err := os.Stat(dstPath); os.IsNotExist(err) { + logrus.Fatalf("%s does not exist locally?", dstPath) + } + } + appFiles, err := config.LoadAppFiles("") if err != nil { logrus.Fatal(err)