Use app.getPath directly for temp path
This commit is contained in:
parent
b3b856f476
commit
a0db484510
8 changed files with 37 additions and 52 deletions
|
@ -13,6 +13,7 @@ class CrashReporter {
|
|||
let {autoSubmit, companyName, extra, ignoreSystemCrashHandler, submitURL} = options
|
||||
|
||||
const app = (process.type === 'browser' ? electron : electron.remote).app
|
||||
this.tempDirectory = app.getPath('temp')
|
||||
if (this.productName == null) {
|
||||
this.productName = app.getName()
|
||||
}
|
||||
|
@ -34,7 +35,6 @@ class CrashReporter {
|
|||
if (extra._version == null) {
|
||||
extra._version = app.getVersion()
|
||||
}
|
||||
|
||||
if (companyName == null) {
|
||||
throw new Error('companyName is a required option to crashReporter.start')
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class CrashReporter {
|
|||
})
|
||||
}
|
||||
|
||||
binding.start(this.productName, companyName, submitURL, autoSubmit, ignoreSystemCrashHandler, extra)
|
||||
binding.start(this.productName, companyName, submitURL, this.tempDirectory, autoSubmit, ignoreSystemCrashHandler, extra)
|
||||
}
|
||||
|
||||
getLastCrashReport () {
|
||||
|
@ -66,7 +66,7 @@ class CrashReporter {
|
|||
}
|
||||
|
||||
getUploadedReports () {
|
||||
return binding._getUploadedReports(this.productName)
|
||||
return binding._getUploadedReports(this.productName, this.tempDirectory)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue