mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-21 19:06:47 +02:00
fix: nil browsing data in case error and walkdir instead of walk (#229)
* fix: nil browsing data in case error Signed-off-by: Andrii Ursulenko <a.ursulenko@gmail.com> * fix: ignore walk error, use walkdir instead of walk --------- Signed-off-by: Andrii Ursulenko <a.ursulenko@gmail.com> Co-authored-by: Andrii Ursulenko <a.ursulenko@gmail.com>
This commit is contained in:
+5
-1
@@ -87,11 +87,13 @@ func pickFirefox(name, profile string) []Browser {
|
||||
} else {
|
||||
profile = fileutil.ParentDir(profile)
|
||||
}
|
||||
|
||||
if !fileutil.IsDirExists(filepath.Clean(profile)) {
|
||||
log.Noticef("find browser firefox %s failed, profile folder does not exist", v.name)
|
||||
continue
|
||||
}
|
||||
if multiFirefox, err := firefox.New(v.name, v.storage, profile, v.items); err == nil {
|
||||
|
||||
if multiFirefox, err := firefox.New(profile, v.items); err == nil {
|
||||
for _, b := range multiFirefox {
|
||||
log.Noticef("find browser firefox %s success", b.Name())
|
||||
browsers = append(browsers, b)
|
||||
@@ -100,8 +102,10 @@ func pickFirefox(name, profile string) []Browser {
|
||||
log.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
return browsers
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user