Commit b638a4f6 authored by Cristian Maglie's avatar Cristian Maglie

Ignore not existent libraries dir

parent 0cfc2263
...@@ -173,6 +173,9 @@ func (sc *LibrariesManager) getSketchbookLibrariesDir() *paths.Path { ...@@ -173,6 +173,9 @@ func (sc *LibrariesManager) getSketchbookLibrariesDir() *paths.Path {
// nil if the directory doesn't exists. // nil if the directory doesn't exists.
func (sc *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) error { func (sc *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) error {
subFolders, err := librariesDir.Path.ReadDir() subFolders, err := librariesDir.Path.ReadDir()
if os.IsNotExist(err) {
return nil
}
if err != nil { if err != nil {
return fmt.Errorf("reading dir %s: %s", librariesDir.Path, err) return fmt.Errorf("reading dir %s: %s", librariesDir.Path, err)
} }
......
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