Commit 897888fd authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

common: fix potential panic case

parent 9c6d0dfc
......@@ -118,7 +118,7 @@ func (d *DownloadClient) Get() (string, error) {
finalPath = url.Path
// Remove forward slash on absolute Windows file URLs before processing
if runtime.GOOS == "windows" && finalPath[0] == '/' {
if runtime.GOOS == "windows" && len(finalPath) > 0 && finalPath[0] == '/' {
finalPath = finalPath[1:len(finalPath)]
}
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment