Merge pull request #30 from rclone-ui/pullrequests/luciodaou/fix-mount

PRs/luciodaou/fix mount
This commit is contained in:
FTCHD
2025-09-11 14:07:19 +01:00
committed by GitHub
3 changed files with 40 additions and 20 deletions
+19
View File
@@ -147,3 +147,22 @@ export async function isInternalRcloneInstalled() {
return false
}
}
export function parseRcloneOptions(options: Record<string, string | number | boolean | string[]>) {
console.log('[parseRcloneOptions]', options)
const parsedOptions: Record<string, string | number | boolean | string[]> = {}
for (const [key, value] of Object.entries(options)) {
if (value === 'true') {
parsedOptions[key] = true
} else if (value === 'false') {
parsedOptions[key] = false
} else {
parsedOptions[key] = value
}
}
console.log('[parseRcloneOptions] parsedOptions', parsedOptions)
return parsedOptions
}