Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Commit

Permalink
Fix missing testFileExists check when changing filePath
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed Jan 8, 2019
1 parent 07f4ce1 commit f23cd4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderer/components/views/Preferences/Preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export default class Preferences extends PureComponent {
}

selectFileDir() {
const { testFileExists } = this.props;

// Show dialog for selecting directory
const fileDirArray = dialog.showOpenDialog({
properties: ['openDirectory']
Expand All @@ -88,6 +90,7 @@ export default class Preferences extends PureComponent {
if (fileDirArray && fileDirArray.length === 1) {
// Use mini-diary.txt file from selected directory
setFileDirPref(fileDirArray[0]);
testFileExists();
this.setState({
fileDir: getFilePathPref()
});
Expand Down

0 comments on commit f23cd4d

Please sign in to comment.