Группа :: Графические оболочки/KDE
Пакет: kdebase
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: kcontrol-3.2.2-xcursor-exclude-symlinks.patch
--- kdebase-3.2.2/kcontrol/input/xcursor/themepage.cpp~ 2004-04-14 20:58:30 +0400
+++ kdebase-3.2.2/kcontrol/input/xcursor/themepage.cpp 2004-04-14 21:34:11 +0400
@@ -274,7 +274,7 @@ bool ThemePage::installThemes( const QSt
for ( QStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it )
{
const KArchiveEntry *entry = archiveDir->entry( *it );
- if ( entry->isDirectory() && entry->name().lower() != "default" ) {
+ if ( entry->isDirectory() && !entry->name().lower().startsWith("default") ) {
const KArchiveDirectory *dir = static_cast< const KArchiveDirectory* >( entry );
if ( dir->entry( "index.theme" ) && dir->entry( "cursors" ) )
themeDirs << dir->name();
@@ -371,7 +371,7 @@ const QStringList ThemePage::getThemeBas
{
#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR < 1
// These are the default paths Xcursor will scan for cursor themes
- QString path( "~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons" );
+ QString path( "~/.icons:/usr/share/icons" );
// If XCURSOR_PATH is set, use that instead of the default path
char *xcursorPath = std::getenv( "XCURSOR_PATH" );
@@ -400,7 +400,7 @@ bool ThemePage::isCursorTheme( const QSt
if ( !dir.exists() )
continue;
- const QStringList subdirs( dir.entryList( QDir::Dirs ) );
+ const QStringList subdirs( dir.entryList( QDir::Dirs|QDir::NoSymLinks|QDir::Readable|QDir::Executable ) );
if ( subdirs.contains( theme ) )
{
const QString path = *it + '/' + theme;
@@ -412,6 +412,8 @@ bool ThemePage::isCursorTheme( const QSt
// Return true if we have a cursors subdirectory
if ( haveCursors )
return true;
+ else
+ return false;
// Parse the index.theme file if one exists
if ( haveIndexFile )
@@ -448,7 +450,7 @@ void ThemePage::insertThemes()
if ( !dir.exists() )
continue;
- QStringList subdirs( dir.entryList( QDir::Dirs ) );
+ QStringList subdirs( dir.entryList( QDir::Dirs|QDir::NoSymLinks|QDir::Readable|QDir::Executable ) );
subdirs.remove( "." );
subdirs.remove( ".." );
@@ -468,7 +470,7 @@ void ThemePage::insertThemes()
// If the directory doesn't have a cursors subdir and lack an
// index.theme file it's definately not a cursor theme
- if ( !haveIndexFile && !haveCursors )
+ if ( !haveCursors )
continue;
// Defaults in case there's no index.theme file or it lacks