From d06fe7be371041cb7698a1562a2c7153c8c8f20b Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 20 Oct 2020 16:15:29 +0100 Subject: Hopefully fix off-by-one error causing errors with local bookpipeline --- local.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'local.go') diff --git a/local.go b/local.go index e112eed..0aa8d1f 100644 --- a/local.go +++ b/local.go @@ -187,9 +187,9 @@ func (a *LocalConn) DelFromQueue(url string, handle string) error { // the '+2' is 1 for newline character + 1 to move beyond handle if len(s) >= len(handle) + 2 { if i > 0 { - complete = s[0:i] + complete = s[:i] } - complete += s[i + len(handle) + 2:len(s)] + complete += s[i + len(handle) + 2:] } f, err := os.Create(filepath.Join(a.TempDir, url)) -- cgit v1.2.1-24-ge1ad