From 42537324925459d5c5c9a96e700045ce4afa1330 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sat, 24 Oct 2015 21:33:15 +0330 Subject: [PATCH] fix(archive): automatically add .zip extension if omitted while creating archives --- src/js/dialogs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/dialogs.js b/src/js/dialogs.js index 3537f91..483d79e 100644 --- a/src/js/dialogs.js +++ b/src/js/dialogs.js @@ -189,6 +189,10 @@ export default { return; } + if (input.value.slice(-4) !== '.zip') { + input.value += '.zip'; + } + let activeFile = store.getState().get('activeFile'); this.props.dispatch(compress(activeFile, input.value)) this.props.dispatch(hideAll());