Perform tilde expansion in the config wrapper

This commit is contained in:
Audrius Butkevicius
2014-10-12 14:09:25 +01:00
parent 838670ccbc
commit a5fe4a3694
3 changed files with 7 additions and 7 deletions

View File

@@ -167,6 +167,12 @@ func (w *ConfigWrapper) Folders() map[string]FolderConfiguration {
if w.folderMap == nil {
w.folderMap = make(map[string]FolderConfiguration, len(w.cfg.Folders))
for _, fld := range w.cfg.Folders {
path, err := osutil.ExpandTilde(fld.Path)
if err != nil {
l.Warnln("home:", err)
continue
}
fld.Path = path
w.folderMap[fld.ID] = fld
}
}