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

Fix #12552: Slash in filename on Mac appears as colon #6561

Closed

Conversation

cbjeukendrup
Copy link
Contributor

@cbjeukendrup cbjeukendrup commented Sep 18, 2020

Resolves: https://musescore.org/en/node/12552

On macOS, you can type a slash in a filename. Internally, macOS handles it as a colon, but to the users it normally shows it as a slash.
However, in MuseScore, this wasn't the case; MuseScore consequently showed a colon. In this PR, I solved this.

There where two things about which I have tried to be very careful:

  • I only changed the code which shows filenames to the user, for example in the window title. Code that handles filenames internally should not be touched. Otherwise, it would give problems with file paths of course.
  • I made sure that my changes only affect macOS, not other OSs, by using #ifdef Q_OS_MAC.

Slash/colon issue fixed, in several places


  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • [N/A] I created the test (mtest, vtest, script test) to verify the changes I made

@Eism
Copy link
Contributor

Eism commented Sep 19, 2020

I don’t think it’s a good way to fix this bug in so many places, unfortunately it’s poorly supported in the future.
Did I understand correctly that the problem appears if the user enters '/' while saving? Can we prohibit '/' input when saving?

@cbjeukendrup
Copy link
Contributor Author

@Eism True, this doesn't make the code easier to understand and to maintain... I considered writing a function for it, but I was not sure where I would do that.

After thinking about it another bit, I believe it's actually a problem of macOS. If you would send a file with '/' in the filename to a non-macOS computer, you would just see a colon. I think macOS should stop showing colons as slashes (because that's actually the problem). So I think I'm going to send some feedback about that to Apple...
We can think about it for another moment, but maybe it's the best to close this PR, isn't it?

@vpereverzev
Copy link
Member

I'd close it because it's a potentially problematic PR for other platforms, however I'd be interested to hear Apple's answer @cbjeukendrup

@cbjeukendrup
Copy link
Contributor Author

@vpereverzev It's okay that you closed it. I sent a message about this to Apple, using their Feedback Assistant, but I didn't get any reaction (I would almost say "as usually"...). I do consider this as a kind of bug from Apple, so I hope they will fix it once.

@cbjeukendrup cbjeukendrup deleted the 12552-slashes-in-filename branch June 3, 2021 14:43
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

Successfully merging this pull request may close these issues.

None yet

3 participants