repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
970de49
parent
fb101af
author
Eric Bower
date
2026-03-02 09:19:20 -0500 EST
fix(pgs): ability to pipe files to pgs
2 files changed,  +9, -0
M pkg/send/pipe/pipe.go
+4, -0
 1@@ -36,6 +36,10 @@ func Middleware(writeHandler utils.CopyFromClientHandler, ext string) pssh.SSHSe
 2 			if name == "" {
 3 				name = fmt.Sprintf("%s%s", strconv.Itoa(int(postTime.UnixNano())), ext)
 4 			}
 5+			// add a `/` prefix mainly for pgs support
 6+			if !strings.HasPrefix(name, "/") {
 7+				name = "/" + name
 8+			}
 9 
10 			result, err := writeHandler.Write(session, &utils.FileEntry{
11 				Filepath: name,
M pkg/shared/bucket.go
+5, -0
 1@@ -24,6 +24,11 @@ func GetProjectName(entry *utils.FileEntry) string {
 2 
 3 	dir := filepath.Dir(entry.Filepath)
 4 	list := strings.Split(dir, string(os.PathSeparator))
 5+	if len(list) == 0 {
 6+		return ""
 7+	} else if len(list) == 1 {
 8+		return list[0]
 9+	}
10 	return list[1]
11 }
12