vlc | branch: master | Angelo Haller <[email protected]> | Fri Aug 31 13:48:37 2012 +0200| [b1c627934b266fd5435d79e3bf17ef3cd8977371] | committer: Jean-Baptiste Kempf
Sanitize file path before deletion. Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1c627934b266fd5435d79e3bf17ef3cd8977371 --- modules/gui/qt4/input_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index 7590846..db05853 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -39,6 +39,7 @@ #include <QApplication> #include <QFile> +#include <QDir> #include <assert.h> @@ -726,6 +727,7 @@ void InputManager::setArt( input_item_t *p_item, QString fileUrl ) { char *psz_cachedir = config_GetUserDir( VLC_CACHE_DIR ); QString old_url = THEMIM->getIM()->decodeArtURL( p_item ); + old_url = QDir( old_url ).canonicalPath(); if( old_url.startsWith( QString::fromUtf8( psz_cachedir ) ) ) QFile( old_url ).remove(); /* Purge cached artwork */ _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
