mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Always allow opening directory savedata
This commit is contained in:
parent
ecf7bcd8ad
commit
ea8cc33003
2 changed files with 7 additions and 2 deletions
|
@ -38,8 +38,7 @@ namespace LibHac.FsService.Creators
|
||||||
switch (entryType)
|
switch (entryType)
|
||||||
{
|
{
|
||||||
case DirectoryEntryType.Directory:
|
case DirectoryEntryType.Directory:
|
||||||
// Actual FS does this check
|
if (!allowDirectorySaveData) return ResultFs.InvalidSaveDataEntryType.Log();
|
||||||
// if (!allowDirectorySaveData) return ResultFs.InvalidSaveDataEntryType.Log();
|
|
||||||
|
|
||||||
rc = SubdirectoryFileSystem.CreateNew(out SubdirectoryFileSystem subDirFs, sourceFileSystem, saveDataPath.ToU8String());
|
rc = SubdirectoryFileSystem.CreateNew(out SubdirectoryFileSystem subDirFs, sourceFileSystem, saveDataPath.ToU8String());
|
||||||
if (rc.IsFailure()) return rc;
|
if (rc.IsFailure()) return rc;
|
||||||
|
|
|
@ -222,9 +222,14 @@ namespace LibHac.FsService
|
||||||
Result rc = OpenSaveDataDirectory(out IFileSystem saveDirFs, spaceId, saveDataRootPath, true);
|
Result rc = OpenSaveDataDirectory(out IFileSystem saveDirFs, spaceId, saveDataRootPath, true);
|
||||||
if (rc.IsFailure()) return rc;
|
if (rc.IsFailure()) return rc;
|
||||||
|
|
||||||
|
// ReSharper disable once RedundantAssignment
|
||||||
bool allowDirectorySaveData = AllowDirectorySaveData(spaceId, saveDataRootPath);
|
bool allowDirectorySaveData = AllowDirectorySaveData(spaceId, saveDataRootPath);
|
||||||
bool useDeviceUniqueMac = Util.UseDeviceUniqueSaveMac(spaceId);
|
bool useDeviceUniqueMac = Util.UseDeviceUniqueSaveMac(spaceId);
|
||||||
|
|
||||||
|
// Always allow directory savedata because we don't support transaction with file savedata yet
|
||||||
|
allowDirectorySaveData = true;
|
||||||
|
|
||||||
|
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||||
if (allowDirectorySaveData)
|
if (allowDirectorySaveData)
|
||||||
{
|
{
|
||||||
rc = saveDirFs.EnsureDirectoryExists(GetSaveDataIdPath(saveDataId));
|
rc = saveDirFs.EnsureDirectoryExists(GetSaveDataIdPath(saveDataId));
|
||||||
|
@ -233,6 +238,7 @@ namespace LibHac.FsService
|
||||||
|
|
||||||
// Missing save FS cache lookup
|
// Missing save FS cache lookup
|
||||||
|
|
||||||
|
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||||
rc = FsCreators.SaveDataFileSystemCreator.Create(out IFileSystem saveFs, out _, saveDirFs, saveDataId,
|
rc = FsCreators.SaveDataFileSystemCreator.Create(out IFileSystem saveFs, out _, saveDirFs, saveDataId,
|
||||||
allowDirectorySaveData, useDeviceUniqueMac, type, null);
|
allowDirectorySaveData, useDeviceUniqueMac, type, null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue