mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-24 11:46:31 +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'
|
||||
|
||||
const _ = require('lodash')
|
||||
const os = require('os')
|
||||
const settings = require('../../../models/settings')
|
||||
const utils = require('../../../../../shared/utils')
|
||||
@ -65,6 +66,7 @@ module.exports = function (
|
||||
* <file-selector path="FileSelectorController.getPath()"></file-selector>
|
||||
*/
|
||||
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 () {
|
||||
app = new spectron.Application({
|
||||
path: entrypoint,
|
||||
port: 9997,
|
||||
port: 9996,
|
||||
args: [ '.' ]
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user