Skip to content

Commit f75e5b6

Browse files
updated alert on creation of file to display output path
1 parent 2780b4d commit f75e5b6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/renderer.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ let dragContainer = document.querySelector('#drag-container');
2323
const execute = document.querySelector('#execute');
2424

2525
let filePathForSub;
26-
let dir;
26+
let outputPathForSub;
2727

28-
execute.addEventListener('click', e => {
28+
execute.addEventListener('click', async e => {
2929
if (dragContainer.classList.contains('ready')) {
3030
console.log('ITS READY');
3131
console.log(`filePathForSub: ${filePathForSub}`);
32+
outputPathForSub = path.dirname(filePathForSub);
3233
(async filePathForSub => {
3334
try {
3435
const file = await processFile(filePathForSub);
@@ -47,7 +48,10 @@ execute.addEventListener('click', e => {
4748
}
4849
})(filePathForSub);
4950
}
50-
alert(`Your file has been created at: ${filePathForSub}`);
51+
52+
alert(
53+
`Your updated file has been created here: ${outputPathForSub}`
54+
);
5155
dragContainer.classList.remove('ready');
5256
});
5357

0 commit comments

Comments
 (0)