Merge pull request #301 from khjde1207/master

反复存档会发生runtime.throw
This commit is contained in:
D 2016-12-28 09:50:29 +08:00 committed by GitHub
commit b5453f02b7
1 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,10 @@ func Load() {
f, _ := os.Open("i18n")
names, _ := f.Readdirnames(-1)
f.Close()
if len(Locales) == len(names)-1 {
return
}
for _, name := range names {
if !strings.HasSuffix(name, ".json") {
continue