From 3d4faf6c7740af8efa6598ff81283af1a526d6f5 Mon Sep 17 00:00:00 2001 From: zweicoder Date: Sat, 30 Jan 2016 01:42:36 +0800 Subject: [PATCH] Respect user choice for naming --- src/options.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/options.js b/src/options.js index 7ac60dc..6391d83 100644 --- a/src/options.js +++ b/src/options.js @@ -82,6 +82,10 @@ function optionsFactory(inpOptions, callback) { } else { options.name = pageTitle; } + if (options.platform === 'linux') { + // spaces will cause problems with Ubuntu when pinned to the dock + options.name = _.kebabCase(options.name); + } callback(); }); } @@ -93,10 +97,6 @@ function optionsFactory(inpOptions, callback) { function sanitizeOptions(options) { options.name = sanitizeFilename(options.name); - if (options.platform === 'linux') { - // spaces will cause problems with Ubuntu when pinned to the dock - options.name = _.kebabCase(options.name); - } return options; }