From f0d228bb60dcb7888c60b92827365faf998aacb6 Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 24 Aug 2024 23:49:16 +0200 Subject: [PATCH] cleanup --- tabby-core/src/api/platform.ts | 7 +------ tabby-electron/src/services/platform.service.ts | 10 +--------- tabby-web/src/platform.ts | 5 ----- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/tabby-core/src/api/platform.ts b/tabby-core/src/api/platform.ts index 834f3622..6f63154f 100644 --- a/tabby-core/src/api/platform.ts +++ b/tabby-core/src/api/platform.ts @@ -22,7 +22,6 @@ export interface MessageBoxResult { export abstract class FileTransfer { abstract getName (): string - abstract getRelativePath (): string | null abstract getMode (): number abstract getSize (): number abstract close (): void @@ -244,7 +243,7 @@ export class HTMLFileUpload extends FileUpload { private stream: ReadableStream private reader: ReadableStreamDefaultReader - constructor (private file: File, private relativePath: string|null = null) { + constructor (private file: File) { super() this.stream = this.file.stream() this.reader = this.stream.getReader() @@ -254,10 +253,6 @@ export class HTMLFileUpload extends FileUpload { return this.file.name } - getRelativePath (): string|null { - return this.relativePath - } - getMode (): number { return 0o644 } diff --git a/tabby-electron/src/services/platform.service.ts b/tabby-electron/src/services/platform.service.ts index 26668392..52fcf9fc 100644 --- a/tabby-electron/src/services/platform.service.ts +++ b/tabby-electron/src/services/platform.service.ts @@ -303,7 +303,7 @@ class ElectronFileUpload extends FileUpload { private buffer: Buffer private powerSaveBlocker = 0 - constructor (private filePath: string, private electron: ElectronService, private relativePath: string|null = null ) { + constructor (private filePath: string, private electron: ElectronService) { super() this.buffer = Buffer.alloc(256 * 1024) this.powerSaveBlocker = electron.powerSaveBlocker.start('prevent-app-suspension') @@ -320,10 +320,6 @@ class ElectronFileUpload extends FileUpload { return path.basename(this.filePath) } - getRelativePath (): string|null { - return this.relativePath - } - getMode (): number { return this.mode } @@ -366,10 +362,6 @@ class ElectronFileDownload extends FileDownload { return path.basename(this.filePath) } - getRelativePath (): null { - return null - } - getMode (): number { return this.mode } diff --git a/tabby-web/src/platform.ts b/tabby-web/src/platform.ts index b64388f9..50958dae 100644 --- a/tabby-web/src/platform.ts +++ b/tabby-web/src/platform.ts @@ -155,7 +155,6 @@ class HTMLFileDownload extends FileDownload { private name: string, private mode: number, private size: number, - private relativePath: string|null = null, ) { super() } @@ -164,10 +163,6 @@ class HTMLFileDownload extends FileDownload { return this.name } - getRelativePath (): string|null { - return this.relativePath - } - getMode (): number { return this.mode }