mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +00:00
fix: use correct usbbot blob path in appimages
We use the `app.asar` relative path to read the usbboot blob files instead of relative to the normal project root. Change-Type: patch Changelog-Entry: Use correct usbboot blob path in AppImages.
This commit is contained in:
parent
4140d49db3
commit
cd697d7205
@ -23,13 +23,16 @@ const path = require('path')
|
|||||||
const settings = require('../models/settings')
|
const settings = require('../models/settings')
|
||||||
const SDK = require('../../../sdk')
|
const SDK = require('../../../sdk')
|
||||||
const permissions = require('../../../shared/permissions')
|
const permissions = require('../../../shared/permissions')
|
||||||
|
const packageJSON = require('../../../../package.json')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary The Etcher "blobs" directory path
|
* @summary The Etcher "blobs" directory path
|
||||||
* @type {String}
|
* @type {String}
|
||||||
* @constant
|
* @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({
|
const scanner = SDK.createScanner({
|
||||||
blockdevice: {
|
blockdevice: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user