fix(drive-scanner): Fix usbboot blob path when bundled

This fixes the usbboot blobs path when the application is bundled & packaged.

Change-Type: fix
Changelog-Entry: Fix usbboot blob loading
This commit is contained in:
Jonas Hermsmeier 2018-04-18 20:35:20 +02:00
parent 4179def119
commit b3a7255eed
No known key found for this signature in database
GPG Key ID: 1B870F801A0CEE9F

View File

@ -30,9 +30,14 @@ const packageJSON = require('../../../../package.json')
* @type {String} * @type {String}
* @constant * @constant
*/ */
const BLOBS_DIRECTORY = packageJSON.packageType === 'AppImage' let BLOBS_DIRECTORY = path.join(__dirname, '..', '..', '..', 'blobs')
? 'bin/resources/app.asar/lib/blobs'
: path.join(__dirname, '..', '..', '..', 'blobs') // FIXME: When bundled & packaged, the blob path differs
if (packageJSON.packageType !== 'local') {
BLOBS_DIRECTORY = packageJSON.packageType === 'AppImage'
? 'bin/resources/app.asar/lib/blobs'
: path.join(__dirname, '..', '..', 'blobs')
}
const scanner = SDK.createScanner({ const scanner = SDK.createScanner({
blockdevice: { blockdevice: {