mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
Merge pull request #773 from tambry/OverwriteFix
Fix overwriting, when installing PKG files
This commit is contained in:
commit
0d4c10b56c
2 changed files with 9 additions and 10 deletions
|
@ -233,19 +233,19 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||||
Emu.Stop();
|
Emu.Stop();
|
||||||
|
|
||||||
// Open and install PKG file
|
// Open and install PKG file
|
||||||
wxString filePath = ctrl.GetPath();
|
std::string filePath = ctrl.GetPath().ToStdString();
|
||||||
rFile pkg_f(filePath.ToStdString(), rFile::read); // TODO: Use VFS to install PKG files
|
rFile pkg_f(filePath, rFile::read); // TODO: Use VFS to install PKG files
|
||||||
|
|
||||||
if (pkg_f.IsOpened())
|
if (pkg_f.IsOpened())
|
||||||
{
|
{
|
||||||
PKGLoader pkg(pkg_f);
|
PKGLoader pkg(pkg_f);
|
||||||
pkg.Install("/dev_hdd0/game/");
|
pkg.Install("/dev_hdd0/game/");
|
||||||
pkg.Close();
|
pkg.Close();
|
||||||
}
|
|
||||||
|
|
||||||
// Refresh game list
|
// Refresh game list
|
||||||
m_game_viewer->Refresh();
|
m_game_viewer->Refresh();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event))
|
void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,9 +31,8 @@ bool PKGLoader::Install(std::string dest)
|
||||||
LOG_ERROR(LOADER, "PKG Loader: Another installation found in: %s", titleID.c_str());
|
LOG_ERROR(LOADER, "PKG Loader: Another installation found in: %s", titleID.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// TODO: Remove the following two lines and remove the folder dest+titleID
|
|
||||||
LOG_ERROR(LOADER, "PKG Loader: Another installation found in: %s", titleID.c_str());
|
rRmdir(dest + titleID);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if (!rMkdir(dest + titleID)) {
|
if (!rMkdir(dest + titleID)) {
|
||||||
LOG_ERROR(LOADER, "PKG Loader: Could not make the installation directory: %s", titleID.c_str());
|
LOG_ERROR(LOADER, "PKG Loader: Could not make the installation directory: %s", titleID.c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue