Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlapping group paths confusion #490

Open
2 tasks done
dodgog opened this issue Jan 13, 2025 · 1 comment
Open
2 tasks done

Overlapping group paths confusion #490

dodgog opened this issue Jan 13, 2025 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@dodgog
Copy link

dodgog commented Jan 13, 2025

Check if applicable

  • I have searched the existing issues (required)
  • I'm willing to help fix the problem and contribute a pull request

Describe the bug

When one group defines a folder for its path, and another group defines as its path the subfolder of the folder, conflicts arise on creation of the note in the subfolder. It seems to randomly decide which group to assign the note to. 50% into folder's group, 50% into subfolders group.

How to reproduce?

zk new --no-input "$ZK_NOTEBOOK_DIR/area/subfolder/"
zk new --no-input "$ZK_NOTEBOOK_DIR/area/subfolder/"

50% of the time this will create a notebook with the template 1 and 50% with the template 2.

zk configuration

[group.area]
paths = ["area"]
[group.area.note]
extension = "md"
template = "template1.md"

[group.subarea]
paths = ["area/subfolder"]
[group.subarea.note]
extension = "md"
template = "template2.md"

Environment

zk 0.14.1
system: Darwin 23.1.0 arm64
@tjex tjex added the bug Something isn't working label Jan 18, 2025
@tjex
Copy link
Member

tjex commented Jan 18, 2025

Yikes... Confirmed.

@tjex tjex added this to the 0.14.2 milestone Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants