Merge pull request #1496 from camporter/linux_compat_fixes

Fix case sensitivity and Platform::fileDelete
This commit is contained in:
Anis 2016-02-19 16:50:27 +01:00
commit cebfc81d7f
9 changed files with 20 additions and 10 deletions

View file

@ -39,7 +39,7 @@
#endif #endif
#ifndef _TSSHAPE_H_ #ifndef _TSSHAPE_H_
#include "ts/TSShape.h" #include "ts/tsShape.h"
#endif #endif
#ifndef __RESOURCE_H__ #ifndef __RESOURCE_H__
#include "core/resource.h" #include "core/resource.h"

View file

@ -148,7 +148,7 @@ GFXDevice::GFXDevice()
mGlobalAmbientColor = ColorF(0.0f, 0.0f, 0.0f, 1.0f); mGlobalAmbientColor = ColorF(0.0f, 0.0f, 0.0f, 1.0f);
mLightMaterialDirty = false; mLightMaterialDirty = false;
dMemset(&mCurrentLightMaterial, NULL, sizeof(GFXLightMaterial)); dMemset(&mCurrentLightMaterial, 0, sizeof(GFXLightMaterial));
// State block // State block
mStateBlockDirty = false; mStateBlockDirty = false;

View file

@ -25,7 +25,7 @@
#ifndef TINYXML_INCLUDED #ifndef TINYXML_INCLUDED
#include "tinyXML/tinyxml.h" #include "tinyxml/tinyxml.h"
#endif #endif
#include "platform/platform.h" #include "platform/platform.h"

View file

@ -28,7 +28,7 @@
#endif #endif
#ifndef TINYXML_INCLUDED #ifndef TINYXML_INCLUDED
#include "tinyXML/tinyxml.h" #include "tinyxml/tinyxml.h"
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -24,7 +24,7 @@
// Debug Profiling. // Debug Profiling.
#include "platform/profiler.h" #include "platform/profiler.h"
#include "persistence/taml/fsTinyxml.h" #include "persistence/taml/fsTinyXml.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -24,7 +24,7 @@
// Debug Profiling. // Debug Profiling.
#include "platform/profiler.h" #include "platform/profiler.h"
#include "persistence/taml/fsTinyxml.h" #include "persistence/taml/fsTinyXml.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -724,6 +724,11 @@ bool Platform::hasSubDirectory(const char *path)
return false; // either this dir had no subdirectories, or they were all on the exclude list. return false; // either this dir had no subdirectories, or they were all on the exclude list.
} }
bool Platform::fileDelete(const char * name)
{
return dFileDelete(name);
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool recurseDumpDirectories(const char *basePath, const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath) bool recurseDumpDirectories(const char *basePath, const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
{ {

View file

@ -325,7 +325,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
if (modType == TOUCH) if (modType == TOUCH)
return(utime(prefPathName, 0) != -1); return(utime(prefPathName, 0) != -1);
else if (modType == DELETE) else if (modType == DELETE)
return (remove(prefPathName) != -1); return (remove(prefPathName) == 0);
else else
AssertFatal(false, "Unknown File Mod type"); AssertFatal(false, "Unknown File Mod type");
return false; return false;
@ -1140,6 +1140,11 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
return false; return false;
} }
bool Platform::fileDelete(const char * name)
{
return ModifyFile(name, DELETE);
}
static bool recurseDumpDirectories(const char *basePath, const char *subPath, Vector<StringTableEntry> &directoryVector, S32 currentDepth, S32 recurseDepth, bool noBasePath) static bool recurseDumpDirectories(const char *basePath, const char *subPath, Vector<StringTableEntry> &directoryVector, S32 currentDepth, S32 recurseDepth, bool noBasePath)
{ {
char Path[1024]; char Path[1024];