mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
[REV] change windows path
This commit is contained in:
parent
b69f0fdd8b
commit
dc07f830b9
@ -354,11 +354,23 @@ func RewriteHostPathInWindows(hostPath string) string {
|
||||
if sharePath == "" {
|
||||
sharePath = "/grdata"
|
||||
}
|
||||
hostPath = strings.Replace(hostPath, "/grdata", `z:\`, 1)
|
||||
hostPath = strings.Replace(hostPath, "/grdata", `z:`, 1)
|
||||
hostPath = strings.Replace(hostPath, "/", `\`, -1)
|
||||
return hostPath
|
||||
}
|
||||
|
||||
//RewriteContainerPathInWindows mount path in windows
|
||||
func RewriteContainerPathInWindows(mountPath string) string {
|
||||
if mountPath == "" {
|
||||
return ""
|
||||
}
|
||||
if mountPath[0] == '/' {
|
||||
mountPath = `c:\` + mountPath[1:]
|
||||
}
|
||||
mountPath = strings.Replace(mountPath, "/", `\`, -1)
|
||||
return mountPath
|
||||
}
|
||||
|
||||
type volumeDefine struct {
|
||||
as *v1.AppService
|
||||
volumeMounts []corev1.VolumeMount
|
||||
|
Loading…
Reference in New Issue
Block a user