aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorelektrahesse2010-09-07 22:34:40 +0200
committerelektrahesse2010-09-07 22:34:40 +0200
commit8d1c6e5634262b728c2f1662bbd8a9170b172854 (patch)
tree858a24899ec7bb5d213cde5486550bf236a9a7ab
parentMerge branch 'weekly' of git://github.com/mccabe/imprudence into weekly (diff)
downloadmeta-impy-8d1c6e5634262b728c2f1662bbd8a9170b172854.zip
meta-impy-8d1c6e5634262b728c2f1662bbd8a9170b172854.tar.gz
meta-impy-8d1c6e5634262b728c2f1662bbd8a9170b172854.tar.bz2
meta-impy-8d1c6e5634262b728c2f1662bbd8a9170b172854.tar.xz
Made the texture fix cross platform and removed boost::filesystem dep for loaterlocalassetbrowse.cpp
-rw-r--r--linden/indra/newview/floaterlocalassetbrowse.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/linden/indra/newview/floaterlocalassetbrowse.cpp b/linden/indra/newview/floaterlocalassetbrowse.cpp
index 0d94e5b..c63fd2d 100644
--- a/linden/indra/newview/floaterlocalassetbrowse.cpp
+++ b/linden/indra/newview/floaterlocalassetbrowse.cpp
@@ -40,12 +40,6 @@ this feature is still a work in progress.
40#include "llviewerprecompiledheaders.h" 40#include "llviewerprecompiledheaders.h"
41#include "lluictrlfactory.h" 41#include "lluictrlfactory.h"
42 42
43/* boost madness from hell */
44#ifdef equivalent
45 #undef equivalent
46#endif
47#include <boost/filesystem.hpp>
48
49/* own class header && upload floater header */ 43/* own class header && upload floater header */
50#include "floaterlocalassetbrowse.h" 44#include "floaterlocalassetbrowse.h"
51//#include "floaterlocaluploader.h" <- in development. 45//#include "floaterlocaluploader.h" <- in development.
@@ -65,6 +59,7 @@ this feature is still a work in progress.
65#include "llfilepicker.h" 59#include "llfilepicker.h"
66#include "llviewermenufile.h" 60#include "llviewermenufile.h"
67#include "llfloaterimagepreview.h" 61#include "llfloaterimagepreview.h"
62#include "llfile.h"
68 63
69/* repeated in header */ 64/* repeated in header */
70#include "lltexturectrl.h" 65#include "lltexturectrl.h"
@@ -125,15 +120,9 @@ LocalBitmap::LocalBitmap(std::string fullpath)
125 120
126 /* getting file's last modified */ 121 /* getting file's last modified */
127 122
128 std::time_t time; 123 llstat temp_stat;
129 124 LLFile::stat(this->filename, &temp_stat);
130#ifdef LL_DARWIN 125 std::time_t time = temp_stat.st_mtime;
131 struct stat temp_stat;
132 stat(fullpath.c_str(), &temp_stat);
133 time = temp_stat.st_mtime;
134#else
135 time = boost::filesystem::last_write_time( boost::filesystem::path( this->filename ) );
136#endif
137 126
138 this->last_modified = asctime( localtime(&time) ); 127 this->last_modified = asctime( localtime(&time) );
139 128
@@ -171,14 +160,10 @@ void LocalBitmap::updateSelf()
171 if ( !gDirUtilp->fileExists(this->filename) ) { this->linkstatus = LINK_BROKEN; return; } 160 if ( !gDirUtilp->fileExists(this->filename) ) { this->linkstatus = LINK_BROKEN; return; }
172 161
173 /* exists, let's check if it's lastmod has changed */ 162 /* exists, let's check if it's lastmod has changed */
174 std::time_t temp_time; 163 llstat temp_stat;
175#ifdef LL_DARWIN 164 LLFile::stat(this->filename, &temp_stat);
176 struct stat temp_stat; 165 std::time_t temp_time = temp_stat.st_mtime;
177 stat(this->filename.c_str(), &temp_stat); 166
178 temp_time = temp_stat.st_mtime;
179#else
180 temp_time = boost::filesystem::last_write_time( boost::filesystem::path( this->filename ) );
181#endif
182 LLSD new_last_modified = asctime( localtime(&temp_time) ); 167 LLSD new_last_modified = asctime( localtime(&temp_time) );
183 if ( this->last_modified.asString() == new_last_modified.asString() ) { return; } 168 if ( this->last_modified.asString() == new_last_modified.asString() ) { return; }
184 169