Skip to content

Commit

Permalink
Store other people's exercises separately
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrina Owen committed Aug 17, 2017
1 parent 976ef0d commit 3ba66cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ Download other people's solutions by providing the UUID.
IsRequester: payload.Solution.User.IsRequester,
}

ws := workspace.New(filepath.Join(client.UserConfig.Workspace, solution.Track))
var ws workspace.Workspace
if solution.IsRequester {
ws = workspace.New(filepath.Join(client.UserConfig.Workspace, solution.Track))
} else {
ws = workspace.New(filepath.Join(client.UserConfig.Workspace, "users", solution.Handle, solution.Track))
}
os.MkdirAll(ws.Dir, os.FileMode(0755))

dir, err := ws.SolutionPath(solution.Exercise, solution.ID)
Expand Down

0 comments on commit 3ba66cc

Please sign in to comment.