Improve ItemStarted/ItemFinished events

- Remove full details from ItemStarted (unnecessary, incorrect CamelCase)

 - Add "type" ("file" or "dir") to both events

 - Add "action" (what we tried to do - "delete" or "update") to both
   events.
This commit is contained in:
Jakob Borg
2015-04-14 20:59:06 +09:00
parent 069e8cf122
commit d1cc1828b8
2 changed files with 41 additions and 27 deletions

View File

@@ -13,15 +13,6 @@ type FileInfoTruncated struct {
ActualSize int64
}
func ToTruncated(file protocol.FileInfo) FileInfoTruncated {
t := FileInfoTruncated{
FileInfo: file,
ActualSize: file.Size(),
}
t.FileInfo.Blocks = nil
return t
}
func (f *FileInfoTruncated) UnmarshalXDR(bs []byte) error {
err := f.FileInfo.UnmarshalXDR(bs)
f.ActualSize = f.FileInfo.Size()