Skip to content

Commit

Permalink
feat: use defaultExportDirectoryMode correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jgenc authored and mokeyish committed Feb 7, 2024
1 parent 6a724e3 commit 881b238
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/ExportDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ const Dialog = (props: { plugin: UniversalExportPlugin, currentFile: TFile, onCl

const exportTypes = globalSetting.items.map(o => ({ name: o.name, value: o.name }));

if (globalSetting.defaultExportDirectoryMode === 'Same') {
const path = currentFile.vault.adapter.getBasePath() + '/' + currentFile.parent.path;
setCandidateOutputDirectory(path);
}

const chooseFolder = async () => {
const retval = await ct.remote.dialog.showOpenDialog({
title: lang.exportDialog.selectExportFolder,
Expand Down

0 comments on commit 881b238

Please sign in to comment.