-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Beats: Fix file permissions on FAT so it can see custom MP3s. #18485
Conversation
On FAT file systems, files look like they have executable permission. For some reason Beats checks for this. Unfortunately, this doesn't really make custom music playable - while they now display, they seem to start stuttering after a short while. Or it's just my files...
Probably because FAT doesn't have executable attribute, thus always executable (with the exception of directory type) |
// All files look like they're executable on FAT. This is required for Beats, see issue #14812 | ||
entry->d_stat.st_mode |= 0111; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. I thought we had a test for this against memstick, but maybe it was actually from host0. However, almost always directories should have the executable bit (some filesystem libs will interpret that correctly as "can traverse" and might restrict to avoid syscall errors.)
Does it fix Beats if it's only directories?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, i guess it's similar to the contents of iOS' IPA(which is a ZIP) where all the folders have executable attribute even when the files in it aren't executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Unix/BSD/Linux/etc. rule is that the 1 bits mean execute for files, and mean "search" or "traverse" for directories - in other words, ability to descend into and access files within. iOS is based on Darwin which is based on BSD, so it inherits the same meaning for those file mode bits.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I tested this, and I confirmed it now - we need the executable flag on the files too, not just the directories.
In fact, we can skip setting execute on the directories and it still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, strange.
-[Unknown]
On FAT file systems, files look like they have executable permission. For some reason Beats checks for this.
Unfortunately, this doesn't really make custom music playable - while they now display, they seem to start stuttering after a short while. Or it's just my files...
Also, should write a pspautotest...