obsidian-hub icon indicating copy to clipboard operation
obsidian-hub copied to clipboard

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

Open claremacrae opened this issue 3 years ago • 7 comments

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?

claremacrae avatar Feb 21 '22 09:02 claremacrae

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

lguenth avatar Feb 22 '22 11:02 lguenth

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 avatar Feb 23 '22 20:02 claremacrae

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

image
  • Signynt links to: https://publish.obsidian.md/hub/01+-+Community/People/Signynt
  • signynt links to: https://publish.obsidian.md/hub/01+-+Community/People/Signynt

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 avatar Feb 23 '22 21:02 claremacrae

I believe the root cause is:

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

In https://github.com/obsidianmd/obsidian-releases/commit/b0b9f6936421f785301d9fcf61588c4a279d3a96, there is this inconsistency in URL:

image

image

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

claremacrae avatar Feb 23 '22 21:02 claremacrae

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

claremacrae avatar Feb 23 '22 21:02 claremacrae

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

argenos avatar Apr 27 '22 20:04 argenos

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

claremacrae avatar Nov 12 '22 14:11 claremacrae