Improve info when config is reloaded. ()

- Using toasts as message outputs (still a lot of room for improvement)

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
This commit is contained in:
Antonio Navarro Perez 2020-11-09 11:33:19 +01:00 committed by GitHub
parent 0e2288565d
commit ab7d379408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 83 additions and 59 deletions
cmd/distribyted

View file

@ -103,13 +103,12 @@ func load(configPath string, port int) error {
for _, mp := range c.MountPoints {
ef(fmt.Sprintf("mounting %v with %d torrents...", mp.Path, len(mp.Torrents)))
if err := mountService.Mount(mp); err != nil {
if err := mountService.Mount(mp, ef); err != nil {
return fmt.Errorf("error mounting folder %v: %w", mp.Path, err)
}
ef(fmt.Sprintf("%v mounted", mp.Path))
}
ef("all OK")
return nil
})