Remove dead code

This commit is contained in:
Audrius Butkevicius
2015-10-25 20:46:09 +00:00
parent f629a998a0
commit 5b03c2d949
7 changed files with 2 additions and 70 deletions

View File

@@ -354,16 +354,6 @@ func (m *Model) Completion(device protocol.DeviceID, folder string) float64 {
return completionPct
}
func sizeOf(fs []protocol.FileInfo) (files, deleted int, bytes int64) {
for _, f := range fs {
fs, de, by := sizeOfFile(f)
files += fs
deleted += de
bytes += by
}
return
}
func sizeOfFile(f db.FileIntf) (files, deleted int, bytes int64) {
if !f.IsDeleted() {
files++

View File

@@ -49,7 +49,7 @@ const retainBits = os.ModeSetgid | os.ModeSetuid | os.ModeSticky
var (
activity = newDeviceActivity()
errNoDevice = errors.New("peers who had this file went away, or the file has changed while syncing. will retry later.")
errNoDevice = errors.New("peers who had this file went away, or the file has changed while syncing. will retry later")
)
const (
@@ -1429,16 +1429,6 @@ func (p *rwFolder) inConflict(current, replacement protocol.Vector) bool {
return false
}
func invalidateFolder(cfg *config.Configuration, folderID string, err error) {
for i := range cfg.Folders {
folder := &cfg.Folders[i]
if folder.ID == folderID {
folder.Invalid = err.Error()
return
}
}
}
func removeDevice(devices []protocol.DeviceID, device protocol.DeviceID) []protocol.DeviceID {
for i := range devices {
if devices[i] == device {