Skip to content

Commit fe0128f

Browse files
author
Lord of Scripts
committed
Fixes GH-5 windows build error
1 parent e9f4992 commit fe0128f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

browsers/chromium/chromium_windows.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ func GetChromiumDirs() (string, string) {
3030
// *MacOS: ~/Library/Caches/Google/Chromium/Default
3131
// *Windows:
3232
func GetCacheDir() string { // TODO: (Windows) needs to be verified!
33-
ChromiumCachesDir, err := filepath.Join(os.UserCacheDir(), "Chromium", "User Data")
33+
cacheDir, err := os.UserCacheDir()
3434
if err != nil {
3535
panic(err.Error())
3636
}
37+
ChromiumCachesDir := filepath.Join(cacheDir, "Chromium", "User Data", "Default", "Cache")
38+
3739
return ChromiumCachesDir
3840
}
3941

@@ -43,6 +45,6 @@ func GetCacheDir() string { // TODO: (Windows) needs to be verified!
4345
// *Windows: %LOCALAPPDATA%\Google\Chrome\User Data\Default
4446
func GetDataDir() string { // TODO: (Windows) needs to be verified!
4547
cacheDir := GetCacheDir()
46-
ChromiumProfilesDir := filepath.Join(cacheDir, "Chromium", "User Data")
48+
ChromiumProfilesDir := filepath.Join(cacheDir, "Chromium", "User Data", "Default")
4749
return ChromiumProfilesDir
4850
}

0 commit comments

Comments
 (0)