-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
cellSaveData: Check filename format of savedata files #11502
Conversation
Unfortunately, it doesn't fix #11501 (at least on macOS) |
what is the content of your savedata? |
|
The "._" prefixed ones are valid as PS3 savedata files, it may honestly need user modification because it is already user modified. Maybe a warning or semething should be shown idk. |
While they could be valid we don't have any indication of them ever being used by the real console. Same deal as with using nul as filename or having two files with same name but different case. The problem is that this isn't caused by user modification, it is from system modification and it might be hard for user to remove those files or prevent them from being created. The only way to "properly" fix cases like these is implement our own file system and just show it as a binary blob to the host OS. But I don't think anyone wants to do that and thus the best solution we can do is to add workarounds for individual cases such as these. |
How about checking the file contents? |
For reference, I've updated #11501 with magic number checks. |
|
{ | ||
continue; | ||
} | ||
|
||
size_kbytes += ::narrow<u32>((entry.size + 1023) / 1024); // firmware rounds this value up | ||
} | ||
|
||
*sizeKB = size_kbytes; | ||
*sizeKB = size_kbytes + 35; |
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.
nani?
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.
rpcs3/rpcs3/Emu/Cell/Modules/cellSaveData.cpp
Line 1510 in 266b605
statGet->sysSizeKB = 35; // always reported as 35 regardless of actual file sizes |
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.
So why not add a comment or whatever
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.
Done
Offhanded yet loyal to proper PS3 emulation semantics fix for the problem mentioned in #11501.
PS3 savedata filenaming format is fortunately pretty limited. Only uppercase A-Z,
_
, space, dot and-
are allowed. And only if fitting the notorious 8.3 naming length constraints.