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

basename truncates file extension, contains no path info #8

Open
mikaelkaron opened this issue May 12, 2015 · 2 comments
Open

basename truncates file extension, contains no path info #8

mikaelkaron opened this issue May 12, 2015 · 2 comments
Assignees

Comments

@mikaelkaron
Copy link

I'm not sure I understand how basename should be expected to work.

For example assuming this structure:

root/
root/dir/foo/one.md
root/dir/bar/two.md

CWD is root and I run:

user@shell:~/root$ m2j dir/*/*.md

Results:

  • basename does not contain .md
  • basename has no path info

Expected:

  • basename to contain .md
  • Either basename (or somewhere else in the json) should have the root/dir/(foo|bar) path info
@barraponto
Copy link
Collaborator

Right now, basename lacks the extension and is used, mainly, as the key in the generated object.
This will probably break if we have both conflict.md and conflict.markdown as file inputs.
To fix that, I think we could use hashed absolute paths (unreadable, but don't give away too many details from user environment). Or just get rid of the keys altogether, turning it into an array.

@scottstanfield
Copy link
Owner

I like this idea of turning the output into an array b/c of possible conflicts. Will consider for next release. Now that I have my CI pipeline and tests working, will be easier to add support.

@scottstanfield scottstanfield self-assigned this Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants