use abs path instead of rel
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 55s

This commit is contained in:
Alexandre Bruyant 2024-01-07 19:56:56 +01:00
parent d9623d5615
commit c269b442ed

View File

@ -59,6 +59,7 @@ func (w *IpfsMultipartWriter) CreateIpfsAbsFilePart(name, absPath string) (io.Wr
h.Set("Content-Type", "application/octet-stream")
return w.CreatePart(h)
}
func main() {
githubactions.Infof("Checking inputs...")
@ -119,15 +120,13 @@ func main() {
return err
}
relPath, _ := filepath.Rel(path, innerPath)
if info.IsDir() {
_, err = mwriter.CreateIpfsDirectoryPart(relPath)
_, err = mwriter.CreateIpfsDirectoryPart(innerPath)
if err != nil {
return err
}
} else {
w, err := mwriter.CreateIpfsFilePart(relPath)
w, err := mwriter.CreateIpfsFilePart(innerPath)
if err != nil {
return err
}