mirror of
https://github.com/Eugeny/tabby.git
synced 2024-09-11 13:13:59 +03:00
This commit is contained in:
parent
fa1649de83
commit
78b17d3980
@ -52,7 +52,8 @@ export class EditSFTPContextMenu extends SFTPContextMenuItemProvider {
|
||||
if (!upload.length) {
|
||||
return
|
||||
}
|
||||
sftp.upload(item.fullPath, upload[0])
|
||||
await sftp.upload(item.fullPath, upload[0])
|
||||
await sftp.chmod(item.fullPath, item.mode)
|
||||
})).subscribe()
|
||||
watcher.on('close', () => events.complete())
|
||||
sftp.closed$.subscribe(() => watcher.close())
|
||||
|
@ -138,6 +138,11 @@ export class SFTPSession {
|
||||
await promisify((f: any) => this.sftp.unlink(p, f))()
|
||||
}
|
||||
|
||||
async chmod (p: string, mode: string|number): Promise<void> {
|
||||
this.logger.debug('chmod', p, mode)
|
||||
await promisify((f: any) => this.sftp.chmod(p, mode, f))()
|
||||
}
|
||||
|
||||
async upload (path: string, transfer: FileUpload): Promise<void> {
|
||||
this.logger.info('Uploading into', path)
|
||||
const tempPath = path + '.tabby-upload'
|
||||
|
Loading…
Reference in New Issue
Block a user