slash handling on windows

This commit is contained in:
FTCHD
2025-02-28 17:28:06 +02:00
parent 55d1daa1d1
commit 14c8e8650f
4 changed files with 18 additions and 6 deletions
+2 -1
View File
@@ -94,7 +94,7 @@ export async function provisionRclone() {
console.log('currentOs', currentOs)
let tempDirPath = await tempDir()
if (tempDirPath.endsWith('/')) {
if (tempDirPath.endsWith('/') || tempDirPath.endsWith('\\')) {
tempDirPath = tempDirPath.slice(0, -1)
}
console.log('tempDirPath', tempDirPath)
@@ -176,6 +176,7 @@ export async function provisionRclone() {
const binaryName = currentPlatform === 'windows' ? 'rclone.exe' : 'rclone'
// "/" here looks to be working on windows
const rcloneBinaryPath = unarchivedPath + '/' + binaryName
console.log('rcloneBinaryPath', rcloneBinaryPath)