Bug fixes for alternative zip layout and define to toggle it on

This commit is contained in:
Tim Newell 2012-12-15 15:30:10 -05:00 committed by DavidWyand-GG
parent 3df2aa64f4
commit 31036c4031
9 changed files with 46 additions and 5 deletions

View file

@ -56,6 +56,7 @@
#include "core/strings/stringFunctions.h"
#include "util/tempAlloc.h"
#include "cinterface/cinterface.h"
#include "core/volume.h"
#if defined(__FreeBSD__)
#include <sys/types.h>
@ -980,7 +981,10 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
// Get file info
struct stat fStat;
if (stat(pFilePath, &fStat) < 0)
return false;
{
// Since file does not exist on disk see if it exists in a zip file loaded
return Torque::FS::IsFile(pFilePath);
}
// if the file is a "regular file" then true
if ( (fStat.st_mode & S_IFMT) == S_IFREG)