admin/sync: handle hint files download

This commit is contained in:
nemunaire 2018-01-07 23:40:11 +01:00
commit 11d0fe8d1f
4 changed files with 57 additions and 17 deletions

View file

@ -16,8 +16,10 @@ type EHint struct {
func treatHintContent(h *EHint) {
if strings.HasPrefix(h.Content, "$FILES") {
h.File = path.Join(FilesDir, strings.TrimPrefix(h.Content, "$FILES"))
h.Content = ""
fpath := strings.TrimPrefix(h.Content, "$FILES")
h.Content = fpath[:128]
fpath = fpath[128:]
h.File = path.Join(FilesDir, fpath)
}
}