vlc/vlc-2.2 | branch: master | Erwan Tulou <[email protected]> | Fri Jun 12 21:12:44 2015 +0200| [ff1783a00518b42cebe0405a20d337628ff537d8] | committer: Erwan Tulou
skins2: replace ifstream() with vlc_stat() (cherry picked from commit 51299c84451404d9f564f24d429bbc21ff4a091a) Signed-off-by: Erwan Tulou <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ff1783a00518b42cebe0405a20d337628ff537d8 --- 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
