Properly trim path separators on Windows

This commit is contained in:
Stefan Cosma 2019-11-20 01:10:19 +01:00
parent bbfa4efdb7
commit a8e6fdb18a
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ func Load(cheatpaths []cp.Cheatpath) ([]map[string]sheet.Sheet, error) {
// accessed. Eg: `cheat tar` - `tar` is the title)
title := strings.TrimPrefix(
strings.TrimPrefix(path, cheatpath.Path),
"/",
string(os.PathSeparator),
)
// ignore hidden files and directories. Otherwise, we'll likely load