switching everything over to []byte, abandoning merkletree for now

This commit is contained in:
2020-07-01 14:33:01 -04:00
parent e4ac7f70e6
commit 07bbb442ef
12 changed files with 215 additions and 82 deletions

View File

@@ -106,12 +106,12 @@ func (db *DB) FindFileByID(ID int) (File, error) {
}
// UpdateFileData updates the current base file that diffs will compare to
func (db *DB) UpdateFileData(filePath, basePath string, hash [16]byte) error {
func (db *DB) UpdateFileData(filePath, basePath string, hash []byte) error {
if file, err := db.FindFileByPath(filePath); err != nil {
db.Err(err).Msg("Error updating the file base")
return err
} else {
err := db.Update(&File{ID: file.ID, CurrentBase: basePath, CurrentHash: hash})
err := db.Update(&File{ID: file.ID, CurrentBase: basePath, Hash: hash})
return err
}
}