From cfbb3481368714adcd734906d8a460b873551c90 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 16 Nov 2020 17:43:27 +0000 Subject: Some changes to ensure the pipeline works correctly on Windows There were a couple of places where a file was uploaded while still open, which resulted in an attempt to remove it, which causes an error from Windows. The allOCRed function also included an assumption that the path separator would be a /, which is always correct for AWS, and correct for local on Linux and OSX, but not for local Windows. Fixed by leaving the separator well alone. Also, the local connection was not stripping leading \, like it did /, which caused an issue with Windows local. Windows local is now tested and working, at least through wine. --- local.go | 1 + 1 file changed, 1 insertion(+) (limited to 'local.go') diff --git a/local.go b/local.go index e5d9bef..e66f477 100644 --- a/local.go +++ b/local.go @@ -134,6 +134,7 @@ func prefixwalker(dirpath string, prefix string, list *[]ObjMeta) filepath.WalkF } n := strings.TrimPrefix(path, dirpath) n = strings.TrimPrefix(n, "/") + n = strings.TrimPrefix(n, "\\") o := ObjMeta{Name: n, Date: info.ModTime()} *list = append(*list, o) return nil -- cgit v1.2.1-24-ge1ad