vlc | branch: master | Erwan Tulou <[email protected]> | 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 = "";

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to