diff --git a/example.js b/example.js index 419576b..62b8fb3 100644 --- a/example.js +++ b/example.js @@ -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 => { if (err) throw err console.log('filesystem mounted on ' + fuse.mnt) diff --git a/index.js b/index.js index 4c66b99..4b01df5 100644 --- a/index.js +++ b/index.js @@ -186,11 +186,11 @@ class Fuse extends Nanoresource { if (this.opts.modules) options.push('modules=' + this.opts.modules) 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) } - return options.map(o => '-o' + o).join(' ') + return options.length ? '-o' + options.join(',') : '' } _makeHandlerArray () {