mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
More rFile cleanups and fixes.
Was using fileExists/dirExists before when really should have just been exists. File or Dir doesn't matter and would only create false negatives. Current working directory shouldn't really be used at all. This is just the folder the application is run from (not even where the .exe resides). Some of the infos required by vfsLocalDir such as executable may not be portable. Not sure of their intended function as they are never used.
This commit is contained in:
parent
6cb083be1a
commit
e8525a6f14
15 changed files with 180 additions and 132 deletions
|
|
@ -13,7 +13,8 @@ bool PKGLoader::Install(std::string dest)
|
|||
if (!pkg_f.IsOpened())
|
||||
return false;
|
||||
|
||||
dest = rGetCwd() + dest;
|
||||
// TODO: This shouldn't use current dir
|
||||
dest.insert(0, 1, '.');
|
||||
if (!dest.empty() && dest.back() != '/')
|
||||
dest += '/';
|
||||
|
||||
|
|
@ -24,7 +25,7 @@ bool PKGLoader::Install(std::string dest)
|
|||
|
||||
std::string titleID = std::string(title_id).substr(7, 9);
|
||||
|
||||
if (rDirExists(dest+titleID)) {
|
||||
if (rExists(dest+titleID)) {
|
||||
rMessageDialog d_overwrite(NULL, "Another installation was found. Do you want to overwrite it?", "PKG Decrypter / Installer", rYES_NO|rCENTRE);
|
||||
if (d_overwrite.ShowModal() != rID_YES) {
|
||||
LOG_ERROR(LOADER, "PKG Loader: Another installation found in: %s", titleID.c_str());
|
||||
|
|
@ -55,4 +56,4 @@ bool PKGLoader::Install(std::string dest)
|
|||
bool PKGLoader::Close()
|
||||
{
|
||||
return pkg_f.Close();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue