WindowsPathToCygwinPath changes C:/path/to/something to //c/path/to/something This should only be used in CYGWIN/git-bash context Sadly, if we have a Windows drive name, it has to be converted from C:/ to //c for Win10Home/Docker toolbox
(windowsPath string)
| 423 | // This should only be used in CYGWIN/git-bash context |
| 424 | // Sadly, if we have a Windows drive name, it has to be converted from C:/ to //c for Win10Home/Docker toolbox |
| 425 | func WindowsPathToCygwinPath(windowsPath string) string { |
| 426 | windowsPath = filepath.ToSlash(windowsPath) |
| 427 | if len(windowsPath) >= 2 && string(windowsPath[1]) == ":" { |
| 428 | drive := strings.ToLower(string(windowsPath[0])) |
| 429 | windowsPath = "/" + drive + windowsPath[2:] |
| 430 | } |
| 431 | return windowsPath |
| 432 | } |
| 433 | |
| 434 | // Chmod changes the file permissions of the named path, |
| 435 | // if the path already has the necessary permissions, do nothing. |
no outgoing calls