fix(ssh): surface SFTP upload errors (#11640)

This commit is contained in:
Chris
2026-09-11 21:58:29 +02:00
committed by GitHub
parent ae4971cf89
commit 9e31ec6dd2
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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 {
+1
View File
@@ -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