mirror of
https://github.com/Eugeny/tabby.git
synced 2025-03-07 15:17:10 +08:00
parent
43e3277c0d
commit
0a0d94ec91
@ -96,7 +96,7 @@ export class SFTPPanelComponent {
|
||||
}
|
||||
|
||||
async uploadOne (transfer: FileUpload): Promise<void> {
|
||||
this.sftp.upload(path.join(this.path, transfer.getName()), transfer)
|
||||
await this.sftp.upload(path.join(this.path, transfer.getName()), transfer)
|
||||
const savedPath = this.path
|
||||
if (this.path === savedPath) {
|
||||
await this.navigate(this.path)
|
||||
|
@ -146,7 +146,9 @@ export class SFTPSession {
|
||||
await handle.write(chunk)
|
||||
}
|
||||
handle.close()
|
||||
await this.unlink(path)
|
||||
try {
|
||||
await this.unlink(path)
|
||||
} catch { }
|
||||
await this.rename(tempPath, path)
|
||||
transfer.close()
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user