windows mount issue #138
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { sep } from '@tauri-apps/api/path'
|
import { sep } from '@tauri-apps/api/path'
|
||||||
|
|
||||||
const RE_WINDOWS_DRIVE = /^[a-zA-Z]:[/\\]/
|
const RE_WINDOWS_DRIVE = /^[a-zA-Z]:([/\\]|$)/
|
||||||
const RE_WINDOWS_DRIVE_WITH_SLASH = /^([a-zA-Z]:)\/?/
|
const RE_WINDOWS_DRIVE_WITH_SLASH = /^([a-zA-Z]:)\/?/
|
||||||
const RE_LOCAL_WINDOWS_PATH = /^:local:([a-zA-Z]:\/?.*)$/
|
const RE_LOCAL_WINDOWS_PATH = /^:local:([a-zA-Z]:\/?.*)$/
|
||||||
const RE_PATH_SEPARATOR = /[/\\]/
|
const RE_PATH_SEPARATOR = /[/\\]/
|
||||||
|
|||||||
+13
-4
@@ -595,6 +595,7 @@ export async function startMount({
|
|||||||
retries: 3,
|
retries: 3,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -715,10 +716,18 @@ export async function startMount({
|
|||||||
global: mergedOptions,
|
global: mergedOptions,
|
||||||
remote: srcOptions,
|
remote: srcOptions,
|
||||||
}),
|
}),
|
||||||
mountPoint:
|
mountPoint: (() => {
|
||||||
platform() === 'windows'
|
if (platform() !== 'windows') {
|
||||||
? dstFullDirPath.replace(':local:', '').replace(RE_BACKSLASH, '/')
|
return dstFullDirPath.replace(':local:', '/')
|
||||||
: dstFullDirPath.replace(':local:', '/'),
|
}
|
||||||
|
const mp = dstFullDirPath
|
||||||
|
.replace(':local:', '')
|
||||||
|
.replace(RE_BACKSLASH, '/')
|
||||||
|
if (/^[a-zA-Z]:\/$/.test(mp)) {
|
||||||
|
return mp.slice(0, -1)
|
||||||
|
}
|
||||||
|
return mp
|
||||||
|
})(),
|
||||||
mount: 'nfsmount',
|
mount: 'nfsmount',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user