VFS::CreatePath fixed, bugfixes

This commit is contained in:
Nekotekina 2015-04-20 18:53:31 +03:00
parent 8c1aa3ee15
commit 56c64c8045
16 changed files with 147 additions and 77 deletions

View file

@ -186,7 +186,7 @@ bool UnpackEntry(const rfile_t& dec_pkg_f, const PKGEntry& entry, std::string di
{
auto path = dir + std::string(buf, entry.name_size);
if (rExists(path))
if (rIsFile(path))
{
LOG_WARNING(LOADER, "PKG Loader: '%s' is overwritten", path);
}
@ -218,7 +218,7 @@ bool UnpackEntry(const rfile_t& dec_pkg_f, const PKGEntry& entry, std::string di
case PKG_FILE_ENTRY_FOLDER:
{
auto path = dir + std::string(buf, entry.name_size);
if (!rExists(path) && !rMkdir(path))
if (!rIsDir(path) && !rMkPath(path))
{
LOG_ERROR(LOADER, "PKG Loader: Could not create directory: %s", path.c_str());
return false;