fix multiple options

auto-timeout
Mathias Buus 4 years ago
parent 5236374b01
commit 62401463df

@ -65,7 +65,7 @@ const ops = {
} }
} }
const fuse = new Fuse('./mnt', ops, { debug: true }) const fuse = new Fuse('./mnt', ops, { debug: true, displayFolder: true })
fuse.mount(err => { fuse.mount(err => {
if (err) throw err if (err) throw err
console.log('filesystem mounted on ' + fuse.mnt) console.log('filesystem mounted on ' + fuse.mnt)

@ -186,11 +186,11 @@ class Fuse extends Nanoresource {
if (this.opts.modules) options.push('modules=' + this.opts.modules) if (this.opts.modules) options.push('modules=' + this.opts.modules)
if (this.opts.displayFolder && IS_OSX) { // only works on osx if (this.opts.displayFolder && IS_OSX) { // only works on osx
options.push('volname=' + path.basename(this.mnt)) options.push('volname=' + path.basename(this.opts.name || this.mnt))
if (HAS_FOLDER_ICON) options.push('volicon=' + OSX_FOLDER_ICON) if (HAS_FOLDER_ICON) options.push('volicon=' + OSX_FOLDER_ICON)
} }
return options.map(o => '-o' + o).join(' ') return options.length ? '-o' + options.join(',') : ''
} }
_makeHandlerArray () { _makeHandlerArray () {

Loading…
Cancel
Save