From dd634fd06b374537a74eeb2d8c3ea1fb5b498d83 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Fri, 18 Oct 2019 07:33:29 -0400 Subject: [PATCH] Bugfix: another command crashes kbtui #19 --- cmdDownload.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmdDownload.go b/cmdDownload.go index 9affc93..8bfd1d6 100644 --- a/cmdDownload.go +++ b/cmdDownload.go @@ -19,6 +19,11 @@ func init() { } func cmdDownloadFile(cmd []string) { + + if len(cmd) < 2 { + printToView("Feed", fmt.Sprintf("/%s $messageId $fileName - Download a file to user's downloadpath", cmd[0])) + return + } messageID, _ := strconv.Atoi(cmd[1]) var fileName string if len(cmd) == 3 {