mirror of
https://github.com/eugeny/tabby
synced 2026-09-24 05:55:39 +00:00
fix(ssh): surface SFTP upload errors (#11640)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user