Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
eb6cbfdb
There was an error fetching the commit references. Please try again later.
Commit
eb6cbfdb
authored
6 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
savedata_factory: Always create a save directory for games.
parent
639346bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/file_sys/savedata_factory.cpp
+9
-0
9 additions, 0 deletions
src/core/file_sys/savedata_factory.cpp
with
9 additions
and
0 deletions
src/core/file_sys/savedata_factory.cpp
+
9
−
0
View file @
eb6cbfdb
...
@@ -17,6 +17,15 @@ SaveData_Factory::SaveData_Factory(std::string nand_directory)
...
@@ -17,6 +17,15 @@ SaveData_Factory::SaveData_Factory(std::string nand_directory)
ResultVal
<
std
::
unique_ptr
<
FileSystemBackend
>>
SaveData_Factory
::
Open
(
const
Path
&
path
)
{
ResultVal
<
std
::
unique_ptr
<
FileSystemBackend
>>
SaveData_Factory
::
Open
(
const
Path
&
path
)
{
std
::
string
save_directory
=
GetFullPath
();
std
::
string
save_directory
=
GetFullPath
();
if
(
!
FileUtil
::
Exists
(
save_directory
))
{
// TODO(bunnei): This is a work-around to always create a save data directory if it does not
// already exist. This is a hack, as we do not understand yet how this works on hardware.
// Without a save data directory, many games will assert on boot. This should not have any
// bad side-effects.
FileUtil
::
CreateFullPath
(
save_directory
);
}
// Return an error if the save data doesn't actually exist.
// Return an error if the save data doesn't actually exist.
if
(
!
FileUtil
::
IsDirectory
(
save_directory
))
{
if
(
!
FileUtil
::
IsDirectory
(
save_directory
))
{
// TODO(Subv): Find out correct error code.
// TODO(Subv): Find out correct error code.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment