fix: find chromium key failed on windows

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-04-20 01:45:36 +08:00
parent 2de62ac1bb
commit 8c2f72ccb6
6 changed files with 29 additions and 35 deletions
+5 -2
View File
@@ -45,8 +45,11 @@ func ReadFile(filename string) (string, error) {
return string(s), err
}
func CopyDir(src, dst string) error {
return cp.Copy(src, dst)
func CopyDir(src, dst, skip string) error {
s := cp.Options{Skip: func(src string) (bool, error) {
return strings.Contains(strings.ToLower(src), skip), nil
}}
return cp.Copy(src, dst, s)
}
func Filename(browser, item, ext string) string {