sync: Expose GetFileSize

This commit is contained in:
nemunaire 2022-11-21 18:55:38 +01:00
commit 257c594dbe
3 changed files with 6 additions and 6 deletions

View file

@ -114,7 +114,7 @@ func CheckExerciceFiles(i Importer, exercice *fic.Exercice, exceptions *CheckExc
if _, err := fic.CheckBufferHash(hash160, hash512, digests[fname]); err != nil {
errs = append(errs, NewFileError(exercice, fname, err))
} else if size, err := getFileSize(i, path.Join(exercice.Path, "files", fname)); err != nil {
} else if size, err := GetFileSize(i, path.Join(exercice.Path, "files", fname)); err != nil {
errs = append(errs, NewFileError(exercice, fname, err))
} else {
var digest_shown []byte
@ -240,7 +240,7 @@ func ApiGetRemoteExerciceFiles(c *gin.Context) {
var ret []*fic.EFile
for _, fname := range files {
fPath := path.Join(exercice.Path, "files", fname)
fSize, _ := getFileSize(GlobalImporter, fPath)
fSize, _ := GetFileSize(GlobalImporter, fPath)
ret = append(ret, &fic.EFile{
Path: fPath,
Name: fname,