Skip to content

Commit

Permalink
Merge pull request #7036 from mih/touch-create
Browse files Browse the repository at this point in the history
Let `create` touch the dataset root, if not saving in parent dataset
  • Loading branch information
mih committed Sep 16, 2022
2 parents 91f6949 + 4142fef commit 06702c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog.d/pr-7036.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Bug Fixes

- Let `create` touch the dataset root, if not saving in parent dataset. [PR
#7036](https://github.com/datalad/datalad/pull/7036) (by
[@mih](https://github.com/mih))
6 changes: 6 additions & 0 deletions datalad/core/local/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ def __call__(
return_type='generator',
result_renderer='disabled',
)
else:
# if we do not save, we touch the root directory of the new
# dataset to signal a change in the nature of the directory.
# this is useful for apps like datalad-gooey (or other
# inotify consumers) to pick up on such changes.
tbds.pathobj.touch()

res.update({'status': 'ok'})
yield res
Expand Down

0 comments on commit 06702c7

Please sign in to comment.