(path string)
| 295 | } |
| 296 | |
| 297 | func ParseSyncPath(path string) (localPath string, remotePath string, err error) { |
| 298 | if path == "" { |
| 299 | return ".", ".", nil |
| 300 | } |
| 301 | |
| 302 | splitted := strings.Split(path, ":") |
| 303 | if len(splitted) > 2 { |
| 304 | newSplitted := []string{} |
| 305 | newSplitted = append(newSplitted, strings.Join(splitted[0:len(splitted)-1], ":")) |
| 306 | newSplitted = append(newSplitted, splitted[len(splitted)-1]) |
| 307 | splitted = newSplitted |
| 308 | } |
| 309 | |
| 310 | if len(splitted) == 1 { |
| 311 | return splitted[0], splitted[0], nil |
| 312 | } |
| 313 | |
| 314 | if splitted[0] == "" { |
| 315 | splitted[0] = "." |
| 316 | } |
| 317 | if splitted[1] == "" { |
| 318 | splitted[1] = "." |
| 319 | } |
| 320 | return splitted[0], splitted[1], nil |
| 321 | } |
| 322 | |
| 323 | func (c *controller) initClient(ctx devspacecontext.Context, pod *v1.Pod, arch, container string, syncConfig *latest.SyncConfig, starter sync.DelayedContainerStarter, verbose bool, customLog logpkg.Logger) (*sync.Sync, error) { |
| 324 | localPath, containerPath, err := ParseSyncPath(syncConfig.Path) |
no outgoing calls