mirror of
https://github.com/zhigang1992/cow.git
synced 2026-01-12 22:46:29 +08:00
Fix PAC error in test script.
This commit is contained in:
@@ -88,4 +88,6 @@ if [[ -z $TRAVIS ]]; then
|
||||
fi
|
||||
|
||||
stop_cow
|
||||
sleep 0.5
|
||||
rm -f ./script/stat*
|
||||
exit 0
|
||||
|
||||
@@ -426,11 +426,14 @@ var siteStat = newSiteStat()
|
||||
func initSiteStat() {
|
||||
err := siteStat.load(config.StatFile)
|
||||
if err != nil {
|
||||
// Simply try to load the stat.back
|
||||
// Simply try to load the stat.back, create a new object to avoid error
|
||||
// in default site list.
|
||||
siteStat = newSiteStat()
|
||||
err = siteStat.load(config.StatFile + ".bak")
|
||||
// After all its not critical , simply re-create a stat object if anything is not ok
|
||||
if err != nil {
|
||||
siteStat = newSiteStat()
|
||||
siteStat.load("") // load default site list
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user