From 1d53714aba344c145debb92af5553fbd33e4ec0e Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 23 Nov 2021 17:51:53 +0000 Subject: [PATCH] config: increase input buffer size to 16k to fix onedrive oauth - fixes #5835 --- fs/config/ui.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/config/ui.go b/fs/config/ui.go index 5e2ded4af..ea8fb90ce 100644 --- a/fs/config/ui.go +++ b/fs/config/ui.go @@ -24,9 +24,11 @@ import ( "golang.org/x/text/unicode/norm" ) +const inputBufferSize = 16 * 1024 + // ReadLine reads some input var ReadLine = func() string { - buf := bufio.NewReader(os.Stdin) + buf := bufio.NewReaderSize(os.Stdin, inputBufferSize) line, err := buf.ReadString('\n') if err != nil { log.Fatalf("Failed to read line: %v", err)