Commit f3be4810 authored by Cristian Maglie's avatar Cristian Maglie

Auto-create data dir when updating lib indexes

parent 5dc0340b
......@@ -28,6 +28,7 @@ var LibraryIndexURL, _ = url.Parse("https://downloads.arduino.cc/libraries/libra
// UpdateIndex downloads the libraries index file from Arduino repository.
func (lm *LibrariesManager) UpdateIndex() (*downloader.Downloader, error) {
lm.IndexFile.Parent().MkdirAll()
lm.IndexFile.Remove()
// TODO: Download from gzipped URL index
return downloader.Download(lm.IndexFile.String(), LibraryIndexURL.String())
......
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