mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-28 13:46:33 +00:00
Merge pull request #2510 from resin-io/fix-file-selector-constraint-path
Fix incorrect file constraint path
This commit is contained in:
commit
89fa682721
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const _ = require('lodash')
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
const settings = require('../../../models/settings')
|
const settings = require('../../../models/settings')
|
||||||
const utils = require('../../../../../shared/utils')
|
const utils = require('../../../../../shared/utils')
|
||||||
@ -65,6 +66,7 @@ module.exports = function (
|
|||||||
* <file-selector path="FileSelectorController.getPath()"></file-selector>
|
* <file-selector path="FileSelectorController.getPath()"></file-selector>
|
||||||
*/
|
*/
|
||||||
this.getPath = () => {
|
this.getPath = () => {
|
||||||
return this.getFolderConstraint() ? '/' : os.homedir()
|
const constraintFolderPath = this.getFolderConstraint()
|
||||||
|
return _.isEmpty(constraintFolderPath) ? os.homedir() : constraintFolderPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ describe('Spectron', function () {
|
|||||||
before('app:start', function () {
|
before('app:start', function () {
|
||||||
app = new spectron.Application({
|
app = new spectron.Application({
|
||||||
path: entrypoint,
|
path: entrypoint,
|
||||||
port: 9997,
|
port: 9996,
|
||||||
args: [ '.' ]
|
args: [ '.' ]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user