switching everything over to []byte, abandoning merkletree for now
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user