Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
leave default path to muon and fix import bookmark cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Nov 16, 2017
1 parent 9685490 commit b42dd08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/browser/bookmarksExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const showDialog = (state) => {
type: 'select-saveas-file',
extensions: ['html']
}, (fileNames) => {
if (fileNames.length === 1) {
if (fileNames && fileNames.length === 1) {
personal = createBookmarkArray(state)
other = createBookmarkArray(state, -1, false)
fs.writeFileSync(fileNames[0], createBookmarkHTML(personal, other))
Expand Down
5 changes: 2 additions & 3 deletions app/browser/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ const createFileSubmenu = () => {
label: locale.translation('openFile'),
accelerator: 'CmdOrCtrl+O',
click: (item, focusedWindow) => {
const defaultPath = getSetting(settings.DOWNLOAD_DEFAULT_PATH) || app.getPath('downloads')
dialog.showDialog(focusedWindow, {
type: 'select-open-multi-file',
defaultPath
title: locale.translation('openFile'),
type: 'select-open-multi-file'
}, (paths) => {
if (paths) {
paths.forEach((path) => {
Expand Down
4 changes: 1 addition & 3 deletions app/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ exports.importHTML = (selected) => {
isImportingBookmarks = true
const state = appStore.getState()
hasBookmarks = bookmarksState.getBookmarks(state).size > 0 || bookmarkFoldersState.getFolders(state).size > 0
const defaultPath = getSetting(settings.DOWNLOAD_DEFAULT_PATH) || app.getPath('downloads')
dialog.showDialog({
type: 'select-open-file',
extensions: ['html', 'htm'],
defaultPath
extensions: ['html', 'htm']
}, (files) => {
if (files && files.length === 1) {
const file = files[0]
Expand Down

0 comments on commit b42dd08

Please sign in to comment.