From a6c546dfeda841ff25b1c83d54f8922edf8fedce Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 13 Jan 2020 18:32:43 -0500 Subject: [PATCH] update storage set --- src/go/storage/storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go/storage/storage.go b/src/go/storage/storage.go index ae75010..5ac393d 100644 --- a/src/go/storage/storage.go +++ b/src/go/storage/storage.go @@ -95,11 +95,12 @@ func handler(status* bool) { func checkAccountSizeAndUpdate(username string, id string) { var size float64 = 0 var userHomeDirectory string = strings.Replace(strings.Join([]string{"/home/", string(username)}, ""), "\"", "", -1) + usernameFormat := strings.Replace(username, "\"", "", -1) sizeHome := DirSize(&userHomeDirectory) size += sizeHome sizeMail := DirSize(&userHomeDirectory) size += sizeMail - status := RedisClient.Set("storage"+"-"+string(username), size, 0) + status := RedisClient.Set("storage"+"-"+usernameFormat, size, 0) fmt.Println(status.Name()) if status.Err() != nil { fmt.Println(status.Err())