Merge branch 'filoozom-patch-1'

* filoozom-patch-1:
  Fix divided by zero when the sync folder is empty (tot = 0)
  Delete cfgFile before renaming it on Windows
  Set the right config and home dir for each OS
  Update getHomeDir() to use "os/user"
This commit is contained in:
Jakob Borg
2014-03-03 14:06:15 +01:00
2 changed files with 37 additions and 5 deletions

View File

@@ -191,7 +191,10 @@ func (m *Model) ConnectionStats() map[string]ConnectionInfo {
}
}
ci.Completion = int(100 * have / tot)
ci.Completion = 100
if tot != 0 {
ci.Completion = int(100 * have / tot)
}
res[node] = ci
}