Skip to content

download: support directory structure for problem files (not just solution files)#281

Merged
kytrinyx merged 2 commits intoexercism:masterfrom
petertseng:dl-mkdir
Jan 25, 2016
Merged

download: support directory structure for problem files (not just solution files)#281
kytrinyx merged 2 commits intoexercism:masterfrom
petertseng:dl-mkdir

Conversation

@petertseng
Copy link
Copy Markdown
Member

A small refactor as well. More detail in commit messages.

Fixes #280

This prepares this functionality for reuse, which will happen soon.
Tested by ensuring that submissions with directory structures can still
be downloaded.
Otherwise, `exercism download` is unable to download submissions to any
problems whose problem files contain directory structures.

For example, Rust project structures include `src` and `tests`
directories and thus most xrust problems have this directory structure.

Internally, this means to use the function created in
ca9c573 for this purpose.

Notice that in a7b39b6 we made a
similar change for submitted files only. That was a conscious decision
based on the assumption that only submitted files might have directory
structures. The assumption was that problem file will never have
directory structures, therefore we don't need to mkdir for them.

As this assumption was proven wrong, we now know we need to create
directories for both problem and submission files.

Tested by ensuring that we can download a Rust submission; we would not
be able to without this commit.

Fixes #280
@kytrinyx
Copy link
Copy Markdown
Member

Very nice, thank you!

kytrinyx added a commit that referenced this pull request Jan 25, 2016
download: support directory structure for problem files (not just solution files)
@kytrinyx kytrinyx merged commit 8cb8ef1 into exercism:master Jan 25, 2016
@petertseng petertseng deleted the dl-mkdir branch January 25, 2016 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants