diff --git a/caplets/manager.go b/caplets/manager.go index 99c84df2..984fc4c8 100644 --- a/caplets/manager.go +++ b/caplets/manager.go @@ -5,7 +5,6 @@ import ( "io/ioutil" "os" "path/filepath" - "runtime" "sort" "strings" "sync" @@ -26,10 +25,7 @@ func List() []*Caplet { for _, fileName := range append(files, files2...) { if _, err := os.Stat(fileName); err == nil { - base := strings.Replace(fileName, searchPath+"/", "", -1) - if runtime.GOOS == "windows" { - base = strings.Replace(fileName, searchPath+"\\", "", -1) - } + base := strings.Replace(fileName, searchPath+string(os.PathSeparator), "", -1) base = strings.Replace(base, Suffix, "", -1) if err, caplet := Load(base); err != nil {