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:
Sacha 2014-08-01 04:20:00 +10:00
parent 6cb083be1a
commit e8525a6f14
15 changed files with 180 additions and 132 deletions

View file

@ -191,7 +191,8 @@ int Unpack(rFile& pkg_f, std::string src, std::string dst)
PKGHeader* m_header = (PKGHeader*) malloc (sizeof(PKGHeader));
rFile dec_pkg_f;
std::string decryptedFile = rGetCwd() + "/dev_hdd1/" + src + ".dec";
// TODO: This shouldn't use current dir
std::string decryptedFile = "./dev_hdd1/" + src + ".dec";
dec_pkg_f.Create(decryptedFile, true);