repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
3978272
parent
13c145a
author
Eric Bower
date
2022-08-02 03:25:50 +0000 UTC
fix: _styles.css error when root directory is provided for scp.
1 files changed,  +4, -2
M prose/scp_hooks.go
+4, -2
 1@@ -22,8 +22,10 @@ func (p *MarkdownHooks) FileValidate(text string, filename string) (bool, error)
 2 		return false, err
 3 	}
 4 
 5-	// special styles css file we want to permit but no other css file
 6-	if filename == "_styles.css" {
 7+	// special styles css file we want to permit but no other css file.
 8+	// sometimes the directory is provided in the filename, so we want to
 9+	// remove that before we perform this check.
10+	if strings.Replace(filename, "/", "", 1) == "_styles.css" {
11 		return true, nil
12 	}
13