mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 14:01:36 +01:00
Properly trim path separators on Windows
This commit is contained in:
parent
bbfa4efdb7
commit
a8e6fdb18a
@ -45,7 +45,7 @@ func Load(cheatpaths []cp.Cheatpath) ([]map[string]sheet.Sheet, error) {
|
|||||||
// accessed. Eg: `cheat tar` - `tar` is the title)
|
// accessed. Eg: `cheat tar` - `tar` is the title)
|
||||||
title := strings.TrimPrefix(
|
title := strings.TrimPrefix(
|
||||||
strings.TrimPrefix(path, cheatpath.Path),
|
strings.TrimPrefix(path, cheatpath.Path),
|
||||||
"/",
|
string(os.PathSeparator),
|
||||||
)
|
)
|
||||||
|
|
||||||
// ignore hidden files and directories. Otherwise, we'll likely load
|
// ignore hidden files and directories. Otherwise, we'll likely load
|
||||||
|
Loading…
Reference in New Issue
Block a user