Skip to content

Commit 3ba66cc

Browse files
author
Katrina Owen
committed
Store other people's exercises separately
1 parent 976ef0d commit 3ba66cc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎cmd/download.go‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ Download other people's solutions by providing the UUID.
8989
IsRequester: payload.Solution.User.IsRequester,
9090
}
9191

92-
ws := workspace.New(filepath.Join(client.UserConfig.Workspace, solution.Track))
92+
var ws workspace.Workspace
93+
if solution.IsRequester {
94+
ws = workspace.New(filepath.Join(client.UserConfig.Workspace, solution.Track))
95+
} else {
96+
ws = workspace.New(filepath.Join(client.UserConfig.Workspace, "users", solution.Handle, solution.Track))
97+
}
9398
os.MkdirAll(ws.Dir, os.FileMode(0755))
9499

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

0 commit comments

Comments
 (0)