summaryrefslogtreecommitdiff
path: root/local.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-11-16 17:43:27 +0000
committerNick White <git@njw.name>2020-11-16 17:43:27 +0000
commitcfbb3481368714adcd734906d8a460b873551c90 (patch)
treec27b53cd40cd975a2773e832fff6b0b90160deb2 /local.go
parenteefa8f50d7ab915ce426c837cf504d26b7d4ccee (diff)
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.
Diffstat (limited to 'local.go')
-rw-r--r--local.go1
1 files changed, 1 insertions, 0 deletions
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