diff --git a/ui/src/hooks/useZsentry.ts b/ui/src/hooks/useZsentry.ts index ca4f05ae..8e169bf1 100644 --- a/ui/src/hooks/useZsentry.ts +++ b/ui/src/hooks/useZsentry.ts @@ -210,12 +210,7 @@ export const useSentry = (lastSendTime?: Ref, t?: any): IUseSentry => { .then(() => { ZmodemBrowser.Browser.save_to_disk(buffer, xfer.get_details().name); message.info(`${t('DownloadSuccess')}: ${detail.name}`); - terminal.write('\r\n'); - - if (zmodeSession.value) { - zmodeSession.value.abort(); - } }) .catch((e: Error) => { message.error(`Error: ${e}`); @@ -223,6 +218,9 @@ export const useSentry = (lastSendTime?: Ref, t?: any): IUseSentry => { }); zsession.on('session_end', () => { + if (zmodeSession.value) { + zmodeSession.value.abort(); + } terminal.write('\r\n'); });