fix config paths
Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
@@ -46,3 +46,19 @@ export function buildReadablePath(path: string, type: 'short' | 'long' = 'long')
|
||||
|
||||
return `${path.split(':')[0]}:/.../${lastSegment}`
|
||||
}
|
||||
|
||||
export function getConfigParentFolder(path: string) {
|
||||
console.log('[getConfigParentFolder] path', path)
|
||||
if (path.endsWith('\\rclone.conf')) {
|
||||
console.log('[getConfigParentFolder] path ends with \\rclone.conf')
|
||||
return path.slice(0, -11)
|
||||
}
|
||||
|
||||
if (path.endsWith('/rclone.conf')) {
|
||||
console.log('[getConfigParentFolder] path ends with /rclone.conf')
|
||||
return path.slice(0, -11)
|
||||
}
|
||||
|
||||
console.log('[getConfigParentFolder] path does not end with \\rclone.conf or /rclone.conf')
|
||||
return path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user