Add database support, basic client-side event processing

This commit is contained in:
2013-02-18 20:44:00 -05:00
parent 6975ef035c
commit b193814371
6 changed files with 242 additions and 65 deletions

View File

@ -50,16 +50,6 @@ func StartWatching(watchDir string, fileUpdates chan *Event) {
event.Path = ev.Name
event.Timestamp = time.Now()
if event.IsUpdate() {
event.Hash, err = HashFile(ev.Name)
if err != nil {
panic("file deleted already?")
continue
}
} else {
event.Hash = ""
}
fileUpdates <- event
case err := <-watcher.Error: