diff options
author | spiff_ <spiff_@svn> | 2009-12-17 16:45:36 +0000 |
---|---|---|
committer | spiff_ <spiff_@svn> | 2009-12-17 16:45:36 +0000 |
commit | 1e867dcc62b344ef1e95eedb6e7fb66497e9bb63 (patch) | |
tree | dc53c2254e9098621f67835dff27e43835753691 /tools/TexturePacker | |
parent | 97dc171b7d5c878778fd446855334c6290f3dd09 (diff) |
fixed: ticket #8133 - Skin media subdir textures not packed into Textures.xbt. use stat() since dirent->d_type is a new feature not supported on all filesystems (reiserfs in particular). thanks to dorphell
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25782 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools/TexturePacker')
-rw-r--r-- | tools/TexturePacker/XBMCTex.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/TexturePacker/XBMCTex.cpp b/tools/TexturePacker/XBMCTex.cpp index 0991a6db41..311a138b35 100644 --- a/tools/TexturePacker/XBMCTex.cpp +++ b/tools/TexturePacker/XBMCTex.cpp @@ -20,6 +20,7 @@ */ #include <sys/types.h> +#include <sys/stat.h> #include <dirent.h> #include <squish.h> #include <string> @@ -104,6 +105,7 @@ bool IsGIF(const char *strFileName) void CreateSkeletonHeaderImpl(CXBTF& xbtf, std::string fullPath, std::string relativePath) { struct dirent* dp; + struct stat stat_p; DIR *dirp = opendir(fullPath.c_str()); while ((dp = readdir(dirp)) != NULL) @@ -113,7 +115,11 @@ void CreateSkeletonHeaderImpl(CXBTF& xbtf, std::string fullPath, std::string rel continue; } - if (dp->d_type == DT_DIR) + //stat to check for dir type (reiserfs fix) + std::string fileN = fullPath + "/" + dp->d_name; + stat(fileN.c_str(), &stat_p); + + if (dp->d_type == DT_DIR || stat_p.st_mode & S_IFDIR) { std::string tmpPath = relativePath; if (tmpPath.size() > 0) |