wslSocketPath will convert the referenced URL to a WSL-compatible path and check if that path exists. If the path exists, it will be returned.
(s string, f fs.FS)
| 162 | // path and check if that path exists. If the path exists, it will |
| 163 | // be returned. |
| 164 | func wslSocketPath(s string, f fs.FS) string { |
| 165 | if p := toWslPath(s); p != "" { |
| 166 | if _, err := stat(p, f); err == nil { |
| 167 | return "/" + p |
| 168 | } |
| 169 | } |
| 170 | return "" |
| 171 | } |
| 172 | |
| 173 | // toWslPath converts the referenced URL to a WSL-compatible |
| 174 | // path if this looks like a Windows absolute path. |
searching dependent graphs…