From 60b00af0bbafb2b3cac0d96fbad4df09389aaa06 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Mon, 6 Jan 2014 05:57:41 +0100 Subject: [PATCH] Workaround for bug in Solaris compiler --- gui.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui.go b/gui.go index 23dff2d32..b6ee83089 100644 --- a/gui.go +++ b/gui.go @@ -43,8 +43,12 @@ func restGetVersion() string { func restGetModel(m *Model, w http.ResponseWriter) { var res = make(map[string]interface{}) - res["globalFiles"], res["globalDeleted"], res["globalBytes"] = m.GlobalSize() - res["localFiles"], res["localDeleted"], res["localBytes"] = m.LocalSize() + globalFiles, globalDeleted, globalBytes := m.GlobalSize() + res["globalFiles"], res["globalDeleted"], res["globalBytes"] = globalFiles, globalDeleted, globalBytes + + localFiles, localDeleted, localBytes := m.LocalSize() + res["localFiles"], res["localDeleted"], res["localBytes"] = localFiles, localDeleted, localBytes + files, total := m.NeedFiles() res["needFiles"], res["needBytes"] = len(files), total