sync: Expose GetFileSize
This commit is contained in:
parent
60d790f8d3
commit
257c594dbe
3 changed files with 6 additions and 6 deletions
|
|
@ -263,7 +263,7 @@ func BuildExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*
|
|||
e.VideoURI = path.Join(epath, "resolution.mp4")
|
||||
if !i.exists(e.VideoURI) {
|
||||
e.VideoURI = ""
|
||||
} else if size, err := getFileSize(i, e.VideoURI); err != nil {
|
||||
} else if size, err := GetFileSize(i, e.VideoURI); err != nil {
|
||||
errs = append(errs, NewExerciceError(e, fmt.Errorf("resolution.mp4: %w", err), theme))
|
||||
e.VideoURI = ""
|
||||
} else if size == 0 {
|
||||
|
|
@ -280,7 +280,7 @@ func BuildExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*
|
|||
}
|
||||
|
||||
if i.exists(writeup) {
|
||||
if size, err := getFileSize(i, writeup); err != nil {
|
||||
if size, err := GetFileSize(i, writeup); err != nil {
|
||||
errs = append(errs, NewExerciceError(e, fmt.Errorf("resolution.md: %w", err), theme))
|
||||
} else if size == 0 {
|
||||
errs = append(errs, NewExerciceError(e, fmt.Errorf("resolution.md: The file is empty!"), theme))
|
||||
|
|
|
|||
Reference in a new issue