don't die if parse called on new archive

This commit is contained in:
dave 2017-11-09 21:36:59 -08:00
parent 13b4718ce2
commit 7b65dcf454
1 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,10 @@ func (self *CombinedLogfile) Parse() {
PORTIONHEADER := []byte("#$$$BEGINPORTION")
ENDPORTIONHEADER := []byte("#$$$ENDPORTION")
if _, err := os.Stat(self.fpath); os.IsNotExist(err) {
return
}
f, err := os.Open(self.fpath)
check(err)
defer f.Close()