diff --git a/tabby-core/src/api/platform.ts b/tabby-core/src/api/platform.ts index 4a8e1eb34..564faba1d 100644 --- a/tabby-core/src/api/platform.ts +++ b/tabby-core/src/api/platform.ts @@ -42,7 +42,7 @@ export abstract class FileTransfer { } isComplete (): boolean { - return this.completed || this.completedBytes >= this.getSize() + return !this.cancelled && (this.completed || this.completedBytes >= this.getSize()) } isCancelled (): boolean { diff --git a/tabby-ssh/src/session/sftp.ts b/tabby-ssh/src/session/sftp.ts index 01dc53a5f..8e2011c0f 100644 --- a/tabby-ssh/src/session/sftp.ts +++ b/tabby-ssh/src/session/sftp.ts @@ -127,6 +127,7 @@ export class SFTPSession { await this.rename(tempPath, path) transfer.close() } catch (e) { + transfer.setStatus(e instanceof Error ? e.message : String(e)) transfer.cancel() this.unlink(tempPath).catch(() => null) throw e