download: support directory structure for problem files (not just solution files)#281
Merged
kytrinyx merged 2 commits intoexercism:masterfrom Jan 25, 2016
petertseng:dl-mkdir
Merged
download: support directory structure for problem files (not just solution files)#281kytrinyx merged 2 commits intoexercism:masterfrom petertseng:dl-mkdir
kytrinyx merged 2 commits intoexercism:masterfrom
petertseng:dl-mkdir
Conversation
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
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small refactor as well. More detail in commit messages.
Fixes #280