diff options
author | Anthony Wang | 2023-05-15 19:39:23 -0400 |
---|---|---|
committer | Anthony Wang | 2023-05-15 19:39:23 -0400 |
commit | 13c3fbab94698231395298293fbae6e38c6d210f (patch) | |
tree | 6b4d43157bce25d0f0fe7e26ed8390913c71fc8c /server/user.go | |
parent | 94f2b70dc7169ac90fdf7d23b823629f19ec7ea8 (diff) |
Diffstat (limited to 'server/user.go')
-rw-r--r-- | server/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/user.go b/server/user.go index cd31ca1..381c947 100644 --- a/server/user.go +++ b/server/user.go @@ -83,7 +83,7 @@ func reconfigure(id string, dhtVal []byte) { persist(id) if !inServers { delete(users, id) - _ = os.RemoveAll(id) + _ = os.RemoveAll(dataDir + "/" + id) } } @@ -99,7 +99,7 @@ func userHandler(w http.ResponseWriter, r *http.Request) { mu.Lock() if _, ok := users[id]; !ok { // Add user - users[id] = &user{dhtVal: val} + users[id] = &user{dhtVal: val, phase: 0} os.Mkdir(dataDir+"/"+id, 0755) persist(id) } |