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

Prevent files being created that differ only in case of name - and deal with signynt.md/Signynt.md #308

Open
claremacrae opened this issue Feb 21, 2022 · 7 comments

Comments

@claremacrae
Copy link
Contributor

My clone of the Hub has got in to some kind of weird state where I cannot make an edit go away...
After a bit of prodding, I've discovered that there are two files that differ only in case of their name...

signynt.md
Signynt.md

image

Each time I reverted edits on one in PyCharm, I got to the other one. So I deleted it to see what would happen, and got the status in the above screenshot, saying both had been deleted...

This will be a problem for Mac users (like me) and Windows users too - both with case-insensitive file systems.

Things to consider...

  • Adding a check in update_releases.py - or one of the functions it calls - to prevent this happening
  • How to actually deal with it, if it happens... (for example, if a file with a name differing only in case exists, then use the name that already exists... Or maybe just treat it as an error that needs human intervention... Or something else)
  • Maybe it's most likely to happen with authors - but could it happen with plugins or themes too?
@lguenth
Copy link
Contributor

lguenth commented Feb 22, 2022

Very weird indeed. I'll see if I can reproduce it and update you then. 🤔

@claremacrae
Copy link
Contributor Author

Very weird indeed. I'll see if I can reproduce it and update you then. 🤔

Hi @lguenth - just to let you know, to hopefully avoid duplication of effort, I'm having a quick initial look at this (on a Linux VM) - as I'm a bot stuck making any edits at all to the Hub until I can resolve this... as any switching between branches fails due to un-preventable local changes...

@claremacrae
Copy link
Contributor Author

Both the files show up in the People MOC on the published hub:

image

That is, it seems that the two links are pointing to the same file, meaning it's more than just a GitHub Mac/Windows limitation of not having files differing only by case - it seems to be a Publish one as well...

@claremacrae
Copy link
Contributor Author

I believe the root cause is:

https://github.com/obsidianmd/obsidian-releases/blob/master/community-plugins.json

In obsidianmd/obsidian-releases@b0b9f69, there is this inconsistency in URL:

image

image

Note the difference between capitalisation of the user name in the two repo fields...

@claremacrae
Copy link
Contributor Author

The above issue is a PR to fix the inconsistency in the upstream community-plugins.json file.

claremacrae added a commit to claremacrae/obsidian-hub that referenced this issue Feb 23, 2022
This deletes the new `signynt.md`, that was created because of an inconsistency in URL capitalisation on the obsidian-releases repo.
kometenstaub added a commit that referenced this issue Feb 23, 2022
@argenos
Copy link
Contributor

argenos commented Apr 27, 2022

From our pairing session on saturday: A simple workaround would be to make all strings lower (or title) case.

@claremacrae
Copy link
Contributor Author

There is now another case of this: Quorafind just got added, in addition to quorafind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants