Remove "open : no such file or directory" message during crash report

Add an empty string check to the path argument of addFile(). Send()
method of BugsnagCrashReporter calls addFile() passing err.LogFilePath
as the path argument, which is an empty string if the driver is not
virtualbox.

Fixes #3559

Signed-off-by: KOBAYASHI Shinji <koba@jp.fujitsu.com>
This commit is contained in:
KOBAYASHI Shinji 2016-06-30 06:46:14 +00:00
parent 5f6bc6fa72
commit cd95232ac7
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ func (r *BugsnagCrashReporter) noReportFileExist() bool {
}
func addFile(path string, metaData *bugsnag.MetaData) {
if path == "" {
return
}
file, err := os.Open(path)
if err != nil {
log.Debug(err)