Skip to content

Conversation

@juliusknorr
Copy link
Member

Fixes #807

This fixes multiple files showing up on case-insensitive filenames as otherwise
the IFolder::get call creates multiple entries in the filecache for the same file. In addition to the fix now the behaviour is actually the correct one where the first matching filename of supported names is picked up for creating the file and obtaining in case there are multiple names matching.

@juliusknorr juliusknorr added bug Something isn't working 3. to review labels May 19, 2020
@juliusknorr juliusknorr added this to the 20.0.0 milestone May 19, 2020
@juliusknorr juliusknorr requested a review from rullzer May 19, 2020 18:07
@juliusknorr
Copy link
Member Author

/backport to stable19

@juliusknorr
Copy link
Member Author

/backport to stable18

@juliusknorr
Copy link
Member Author

/compile /

@cypress
Copy link

cypress bot commented May 19, 2020



Test summary

12 0 0 0


Run details

Project text
Status Passed
Commit 7d6569c
Started May 19, 2020 8:27 PM
Ended May 19, 2020 8:28 PM
Duration 00:51 💡
OS Linux Ubuntu Linux - 18.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

}
this.creating = true
window.FileList.createFile('Readme.md', { scrollTo: false, animate: false }).then((status, data) => {
window.FileList.createFile(t('text', 'Readme') + '.md', { scrollTo: false, animate: false }).then((status, data) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind to explain that change 🤔 You want to support 'Liesmich.md` as well 🤣

Copy link
Member Author

@juliusknorr juliusknorr May 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mainly fixing the behavior I assumed I had already implemented 🙈

See #727 (comment) for the discussion on the translated file name 😉

I also think the german "Anleitung.md" is a bit odd, but also agree with @jancborchardt that Readme.md is a quite technical description that might confuse users.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh :) I think translating the file name is a mistake. You add a lot of complexity and weirdness but fine by me.

Copy link
Contributor

@kesselb kesselb May 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current assumption is that everyone uses the same language:

  1. We have Alice (lang: german) and Bob (lang: english)
  2. Alice creates a folder and uses rich workspace. A file Anleitung.md is created.
  3. Alice shares the Folder to Bob.
  4. Bob does not see rich workspace because Anleitung.md is not a valid file name for him.
  5. Bob also uses rich workspace. A file Readme.md is created.
  6. They both edit rich workspace but do not see their changes ;)

Sure. We could fetch all languages (or all languages for a folder shared with other users), collect all translations for readme and check their existence. Probably easier to add some explanation about the Readme.md and Rich Workspace instead of magic to guess what the user wants ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a very good point actually. Then we probably should keep Readme.md as the default and just allow the translated name to be picked up if such a file exists. What do you think @jancborchardt

I removed this commit from the PR now since it is actually unrelated to the fix for #807 it just was my first trace to the bug. ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think @jancborchardt

I always think that the task of software is to reduce complexity towards people using the software – and yes that means more complexity in the code, which is fine. :) It will be very strange to any non-English speaker, especially non-native, if a file called "Readme.md" shows up in their file list.


Every application has an inherent amount of irreducible complexity. The only question is: Who will have to deal with it—the user, the application developer, or the platform developer?

See https://en.wikipedia.org/wiki/Law_of_conservation_of_complexity

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just to clarify: I do realize this would probably be a ton of work, so feel free to put it very far down on the todo list or not on it at all. ;)
(Also, there might be confusion the other way around when someone on the team says "Check the readme" and it’s called differently for everyone.)

This fixes multiple files showing up on case-insensitive filenames as otherwise
the IFolder::get call creates multiple entries in the filecache for the same file

Signed-off-by: Julius Härtl <[email protected]>
@JMoVS
Copy link

JMoVS commented Feb 21, 2022

if this was supposed to fix multiple Readme.md being created on case insensitive file systems - it did not fix it as shown in #1546

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

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Readme, readme and README on external HDD

7 participants