diff --git a/package-lock.json b/package-lock.json index 0aec2bf..cca1c9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "3.0.21", "license": "AGPLv3", "dependencies": { - "@filen/network-drive": "^0.9.15", + "@filen/network-drive": "^0.9.16", "@filen/s3": "^0.2.39", "@filen/sdk": "^0.1.167", - "@filen/sync": "^0.1.65", + "@filen/sync": "^0.1.66", "@filen/web": "^0.1.43", "@filen/webdav": "^0.2.52", "axios": "^1.7.2", @@ -1880,9 +1880,9 @@ } }, "node_modules/@filen/network-drive": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/@filen/network-drive/-/network-drive-0.9.15.tgz", - "integrity": "sha512-A4nvU3QBaeGPthIx+XxynAv9gQGffU7a9fp+QSOAiRlIrK/g/29kFOSWiKXE47mnmwrg8Ddhj9VnC1hIF2udrA==", + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@filen/network-drive/-/network-drive-0.9.16.tgz", + "integrity": "sha512-UPaPM7uI0++QB7MxH0U5pioVTGLF1iFKIBCpBB7cUTqITq/eTSiSW1had816RcD3gEa8v19GWgyMPRp9r0CD0g==", "license": "AGPLv3", "dependencies": { "@filen/sdk": "^0.1.167", @@ -1966,9 +1966,9 @@ } }, "node_modules/@filen/sync": { - "version": "0.1.65", - "resolved": "https://registry.npmjs.org/@filen/sync/-/sync-0.1.65.tgz", - "integrity": "sha512-VddddiPhlE1/F9iJzUDksN090BN3mj4nTj/vfow8CZTW4bQd09IHpc5Wa/wQQSzljLbUGf72+8AOhkFSf1WCNA==", + "version": "0.1.66", + "resolved": "https://registry.npmjs.org/@filen/sync/-/sync-0.1.66.tgz", + "integrity": "sha512-u9fqCPvSnWYe+t/DKDoNded/tEf3w6Xa0OByMxT9pQPYqcfEgfZXjiSFHnlqv1Thp5e+gxAbEmrs1tm3/LKcjQ==", "license": "AGPLv3", "dependencies": { "@filen/sdk": "^0.1.167", diff --git a/package.json b/package.json index de46c94..60ff343 100644 --- a/package.json +++ b/package.json @@ -67,10 +67,10 @@ "wait-on": "^7.2.0" }, "dependencies": { - "@filen/network-drive": "^0.9.15", + "@filen/network-drive": "^0.9.16", "@filen/s3": "^0.2.39", "@filen/sdk": "^0.1.167", - "@filen/sync": "^0.1.65", + "@filen/sync": "^0.1.66", "@filen/web": "^0.1.43", "@filen/webdav": "^0.2.52", "axios": "^1.7.2", diff --git a/src/index.ts b/src/index.ts index db1b785..28a3601 100644 --- a/src/index.ts +++ b/src/index.ts @@ -317,6 +317,10 @@ if (IS_ELECTRON) { console.error(err) dialog.showErrorBox("Could not launch Filen", err instanceof Error ? err.message : "Unknown error") + + setTimeout(() => { + app?.exit(1) + }, 3000) }) } diff --git a/src/utils.ts b/src/utils.ts index 547843d..58d9f09 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -217,7 +217,10 @@ export function parseByteRange(range: string, totalLength: number): { start: num return null } - return { start, end } + return { + start, + end + } } export type DriveInfo = { @@ -238,8 +241,11 @@ export type LinuxDrive = { children?: LinuxDrive[] } +// eslint-disable-next-line @typescript-eslint/no-unused-vars export async function getDiskType(filePath: string): Promise { - const normalizedPath = pathModule.resolve(filePath) + return null // Temporary disabled + + /*const normalizedPath = pathModule.resolve(filePath) if (process.platform === "win32") { return await getDiskTypeWindows(normalizedPath) @@ -249,7 +255,7 @@ export async function getDiskType(filePath: string): Promise { return await getDiskTypeLinux(normalizedPath) } else { throw new Error(`Unsupported platform: ${process.platform}`) - } + }*/ } export async function getDiskTypeWindows(filePath: string): Promise { @@ -278,7 +284,7 @@ export async function getDiskTypeWindows(filePath: string): Promise { +export async function getDiskTypeMacOS(filePath: string): Promise { try { const mountOutput = await execCommand(`df "${filePath}" | tail -1 | awk '{print $1}'`) @@ -318,7 +324,7 @@ async function getDiskTypeMacOS(filePath: string): Promise { } } -async function getDiskTypeLinux(filePath: string): Promise { +export async function getDiskTypeLinux(filePath: string): Promise { try { const stdout = await execCommand("lsblk -o NAME,TYPE,MOUNTPOINT,FSTYPE,MODEL,SERIAL,SIZE,STATE,ROTA --json") const drives: { blockdevices: LinuxDrive[] } = JSON.parse(stdout)