Skip to content

CohortDataImport::initialise(): Fix for cwd#2057

Merged
jdtournier merged 1 commit intomasterfrom
inference_subjectlist_load_fix
May 17, 2020
Merged

CohortDataImport::initialise(): Fix for cwd#2057
jdtournier merged 1 commit intomasterfrom
inference_subjectlist_load_fix

Conversation

@Lestropie
Copy link
Copy Markdown
Member

Fixes issue reported on forum.

Fixes issue where an exception is erroneously thrown when the subject filename list resides in the current working directory, and no template directory is defined.

Error arising from #1977.

It is possible to bypass the issue by simply prepending the path to the subject file list with "./"; nevertheless targeting at master since it's a bug.

@Lestropie Lestropie added the bug label May 17, 2020
@Lestropie Lestropie requested a review from a team May 17, 2020 03:31
@Lestropie Lestropie self-assigned this May 17, 2020
Empty string output by Path::dirmane() if the location of the list file is the current working directory would lead to an erroneous Exception being thrown, as that string being empty is also used as a flag to indicate that none of the candidate directories were reliable references for finding all subject files.
This fix uses "." rather than "" for the current working directory, so that if a valid Exception is indeed thrown the error message should make more sense.
@jdtournier jdtournier merged commit 2821ec4 into master May 17, 2020
@jdtournier jdtournier deleted the inference_subjectlist_load_fix branch May 17, 2020 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants