sync: handle new sync format: filenames and locations
This commit is contained in:
parent
12cb4e95f4
commit
d303ecfa38
4 changed files with 14 additions and 33 deletions
|
|
@ -50,8 +50,8 @@ func SyncThemes(i Importer) []string {
|
|||
if authors, err = getAuthors(i, tname); err != nil {
|
||||
errs = append(errs, fmt.Sprintf("%q: unable to get AUTHORS: %s", tname, err))
|
||||
continue
|
||||
} else if intro, err = getFileContent(i, path.Join(tname, "introduction.txt")); err != nil {
|
||||
errs = append(errs, fmt.Sprintf("%q: unable to get introduction: %s", tname, err))
|
||||
} else if intro, err = getFileContent(i, path.Join(tname, "overview.txt")); err != nil {
|
||||
errs = append(errs, fmt.Sprintf("%q: unable to get theme's overview: %s", tname, err))
|
||||
} else if theme, err = fic.GetThemeByName(tname); err != nil {
|
||||
if _, err := fic.CreateTheme(tname, fic.ToURLid(tname), strings.Join(authors, ", "), intro); err != nil {
|
||||
errs = append(errs, fmt.Sprintf("%q: an error occurs during add: %s", tname, err))
|
||||
|
|
|
|||
Reference in a new issue