Skip to content

Commit

Permalink
Cleaner way
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 17, 2024
1 parent 4fea6ee commit d1fb213
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Core/PSPLoaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
ms_path = "umd0:/";
}

Path dir;
if (!PSP_CoreParameter().mountRoot.empty()) {
// We don't want to worry about .. and cwd and such.
const Path rootNorm = NormalizePath(PSP_CoreParameter().mountRoot);
Expand Down Expand Up @@ -423,15 +424,10 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
file = filepath + "/" + file;
path = rootNorm.ToString();
pspFileSystem.SetStartingDirectory(filepath);
dir = Path(path);
} else {
pspFileSystem.SetStartingDirectory(ms_path);
}

Path dir;
if (full_path.Type() == PathType::CONTENT_URI) {
dir = full_path.NavigateUp();
} else {
dir = Path(path);
}

std::shared_ptr<IFileSystem> fs = std::shared_ptr<IFileSystem>(new DirectoryFileSystem(&pspFileSystem, dir, FileSystemFlags::SIMULATE_FAT32 | FileSystemFlags::CARD));
Expand Down

0 comments on commit d1fb213

Please sign in to comment.