windows cli fixes

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-09-23 20:27:35 +02:00
parent 98c985dad4
commit d2e0d1018a
5 changed files with 24 additions and 15 deletions
+6 -6
View File
@@ -2,7 +2,7 @@ import { appLocalDataDir, sep } from '@tauri-apps/api/path'
import { exists, mkdir, writeTextFile } from '@tauri-apps/plugin-fs'
import { fetch } from '@tauri-apps/plugin-http'
import { Command } from '@tauri-apps/plugin-shell'
import { RCLONE_CONF_REGEX } from './constants'
import { DOUBLE_BACKSLASH_REGEX, RCLONE_CONF_REGEX } from './constants'
export async function getDefaultPaths() {
console.log('[getDefaultPaths]')
@@ -20,12 +20,12 @@ export async function getDefaultPaths() {
console.log('[getDefaultPaths] json', JSON.stringify(defaultPaths, null, 2))
const doubleBackslashRegex = /\\\\/g
return {
cache: defaultPaths.cache ? defaultPaths.cache.replace(doubleBackslashRegex, '\\') : '',
config: defaultPaths.config ? defaultPaths.config.replace(doubleBackslashRegex, '\\') : '',
temp: defaultPaths.temp ? defaultPaths.temp.replace(doubleBackslashRegex, '\\') : '',
cache: defaultPaths.cache ? defaultPaths.cache.replace(DOUBLE_BACKSLASH_REGEX, '\\') : '',
config: defaultPaths.config
? defaultPaths.config.replace(DOUBLE_BACKSLASH_REGEX, '\\')
: '',
temp: defaultPaths.temp ? defaultPaths.temp.replace(DOUBLE_BACKSLASH_REGEX, '\\') : '',
}
}
+1
View File
@@ -15,3 +15,4 @@ export const RCLONE_VFS_DEFAULTS = {
}
export const RCLONE_CONF_REGEX = /[\/\\]rclone\.conf$/
export const DOUBLE_BACKSLASH_REGEX = /\\\\/g