Avoid Atoi to avoid int convertion

This commit is contained in:
nemunaire 2018-12-01 16:15:28 +01:00
commit 0f48b27a04
11 changed files with 32 additions and 39 deletions

View file

@ -67,9 +67,9 @@ func GetFiles() ([]EFile, error) {
}
// GetFile retrieves the file with the given id.
func GetFile(id int) (f EFile, err error) {
func GetFile(id int64) (f EFile, err error) {
err = DBQueryRow("SELECT id_file, origin, path, name, cksum, size FROM exercice_files WHERE id_file = ?", id).Scan(&f.Id, &f.origin, &f.Path, &f.Name, &f.Checksum, &f.Size)
return f, err
return
}
// GetFileByPath retrieves the file that should be found at the given location.