via

Simple pubsub server inspired by https://patchbay.pub/
git clone https://git.ce9e.org/via.git

commit
84069757250185aaa5cbf5f6e89ef22260526466
parent
69e4b6bed62cc4e8355ec2c6e865a9c98124739d
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-07-16 06:27
strip store prefix in filename

Diffstat

M via.go 3 ++-

1 files changed, 2 insertions, 1 deletions


diff --git a/via.go b/via.go

@@ -78,7 +78,8 @@ func popChannel(key string, ch chan []byte) {
   78    78 }
   79    79 
   80    80 func getStorePath(key string) string {
   81    -1 	hash := base64.URLEncoding.EncodeToString([]byte(key))
   -1    81 	rel := strings.TrimPrefix(key, "/store/")
   -1    82 	hash := base64.URLEncoding.EncodeToString([]byte(rel))
   82    83 	return path.Join(dir, hash)
   83    84 }
   84    85