fixed typo in glob pattern, - -> .

Signed-off-by: Cocoa <0xbbc@0xbbc.com>
This commit is contained in:
Cocoa 2020-02-25 20:56:26 +08:00
parent 61b46a1d8e
commit 2b40d844a4
No known key found for this signature in database
GPG Key ID: 9821F9625A97231D

View File

@ -165,7 +165,7 @@ func main() {
// /home/webp_server/exhaust/path/to/tsuki.jpg.1582558100.webp <- older ones will be removed
// /home/webp_server/exhaust/path/to/tsuki.jpg.1582558990.webp <- keep the latest one
WebpCachedImgPath := path.Clean(fmt.Sprintf("%s/exhaust%s/%s-*.webp", CurrentPath, DirPath, ImgName))
WebpCachedImgPath := path.Clean(fmt.Sprintf("%s/exhaust%s/%s.*.webp", CurrentPath, DirPath, ImgName))
matches, err := filepath.Glob(WebpCachedImgPath)
if err != nil {
fmt.Println(err.Error())