Skip to content

Commit

Permalink
BF: Make Dataset('^') work with a non-dataset-root path
Browse files Browse the repository at this point in the history
Dataset.get_super_dataset() assumes that the Dataset instance is
pointing to an actual dataset root, not just somewhere inside.

Fixes gh-3709
  • Loading branch information
mih committed Oct 11, 2019
1 parent 5d8d5a6 commit 719dfa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datalad/distribution/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def _flyweight_id_from_args(cls, *args, **kwargs):
if path == '^':
# get the topmost dataset from current location. Note that 'zsh'
# might have its ideas on what to do with ^, so better use as -d^
path_ = Dataset(curdir).get_superdataset(topmost=True).path
path_ = Dataset(rev_get_dataset_root(curdir)).get_superdataset(
topmost=True).path
elif path == '///':
# TODO: logic/UI on installing a default dataset could move here
# from search?
Expand Down

0 comments on commit 719dfa1

Please sign in to comment.