[vlc-commits] skins2: replace ifstream() with vlc_stat()
Erwan Tulou
git at videolan.org
Fri Jun 12 21:48:56 CEST 2015
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Fri Jun 12 21:12:44 2015 +0200| [51299c84451404d9f564f24d429bbc21ff4a091a] | committer: Erwan Tulou
skins2: replace ifstream() with vlc_stat()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=51299c84451404d9f564f24d429bbc21ff4a091a
---
modules/gui/skins2/parser/builder.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/gui/skins2/parser/builder.cpp b/modules/gui/skins2/parser/builder.cpp
index ece673f..7d8ae77 100644
--- a/modules/gui/skins2/parser/builder.cpp
+++ b/modules/gui/skins2/parser/builder.cpp
@@ -57,8 +57,9 @@
#include "../utils/var_bool.hpp"
#include "../utils/var_text.hpp"
+#include <sys/stat.h>
+#include <vlc_fs.h>
#include <vlc_image.h>
-#include <fstream>
Builder::Builder( intf_thread_t *pIntf, const BuilderData &rData,
@@ -1260,8 +1261,9 @@ string Builder::getFilePath( const string &rFileName ) const
string full_path = m_path + sep + sFromLocale( file );
- // check that the file exists and can be read
- if( ifstream( full_path.c_str() ).fail() )
+ // check that the file exists
+ struct stat stat;
+ if( vlc_stat( full_path.c_str(), &stat ) )
{
msg_Err( getIntf(), "missing file: %s", file.c_str() );
full_path = "";
More information about the vlc-commits
mailing list