Merge pull request #2140 from resin-io/fix-usbboot-appimages

fix: use correct usbbot blob path in appimages
This commit is contained in:
Jonas Hermsmeier 2018-03-27 19:48:36 +02:00 committed by GitHub
commit ce71b81dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,13 +23,16 @@ const path = require('path')
const settings = require('../models/settings')
const SDK = require('../../../sdk')
const permissions = require('../../../shared/permissions')
const packageJSON = require('../../../../package.json')
/**
* @summary The Etcher "blobs" directory path
* @type {String}
* @constant
*/
const BLOBS_DIRECTORY = path.join(__dirname, '..', '..', '..', 'blobs')
const BLOBS_DIRECTORY = packageJSON.packageType === 'AppImage'
? 'bin/resources/app.asar/lib/blobs'
: path.join(__dirname, '..', '..', '..', 'blobs')
const scanner = SDK.createScanner({
blockdevice: {