summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-07-06 11:17:00 (UTC)
committer zautrix <zautrix>2005-07-06 11:17:00 (UTC)
commit7e22293b1ec1ee190ca8db6c8ecd079bafdae520 (patch) (unidiff)
treeaed67fbbd844480e3dc0a7b5587edca766b51a5f /microkde
parent3b77a857e17e04e47d22ba6017dd723ed922e3fc (diff)
downloadkdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.zip
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.gz
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.bz2
fixes
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/ofileselector_p.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp
index 488dee2..f4f112e 100644
--- a/microkde/ofileselector_p.cpp
+++ b/microkde/ofileselector_p.cpp
@@ -343,53 +343,53 @@ void OFileViewFileListView::reread( bool all ) {
343 filter = QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All; 343 filter = QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All;
344 else 344 else
345 filter = QDir::Files | QDir::Dirs | QDir::All; 345 filter = QDir::Files | QDir::Dirs | QDir::All;
346 dir.setFilter( filter ); 346 dir.setFilter( filter );
347 347
348 // now go through all files 348 // now go through all files
349 const QFileInfoList *list = dir.entryInfoList(); 349 const QFileInfoList *list = dir.entryInfoList();
350 if (!list) { 350 if (!list) {
351 cdUP(); 351 cdUP();
352 return; 352 return;
353 } 353 }
354 QFileInfoListIterator it( *list ); 354 QFileInfoListIterator it( *list );
355 QFileInfo *fi; 355 QFileInfo *fi;
356 while( (fi=it.current() ) ){ 356 while( (fi=it.current() ) ){
357 if( fi->fileName() == QString::fromLatin1("..") || fi->fileName() == QString::fromLatin1(".") ){ 357 if( fi->fileName() == QString::fromLatin1("..") || fi->fileName() == QString::fromLatin1(".") ){
358 ++it; 358 ++it;
359 continue; 359 continue;
360 } 360 }
361 361
362 /* 362 /*
363 * It is a symlink we try to resolve it now but don't let us attack by DOS 363 * It is a symlink we try to resolve it now but don't let us attack by DOS
364 * 364 *
365 */ 365 */
366 if( fi->isSymLink() ){ 366 if( fi->isSymLink() ){
367 qDebug("SYMLINK "); 367 //qDebug("SYMLINK ");
368 QString file = fi->readLink(); 368 QString file = fi->readLink();
369 for( int i = 0; i<=5; i++) { // 5 tries to prevent dos 369 for( int i = 0; i<=5; i++) { // 5 tries to prevent dos
370 QFileInfo info( file ); 370 QFileInfo info( file );
371 qDebug("FILE %s ", file.latin1()); 371 //qDebug("FILE %s ", file.latin1());
372 if( !info.exists() ){ 372 if( !info.exists() ){
373 addSymlink( fi, TRUE ); 373 addSymlink( fi, TRUE );
374 break; 374 break;
375 }else if( info.isDir() ){ 375 }else if( info.isDir() ){
376 addDir( fi, TRUE ); 376 addDir( fi, TRUE );
377 break; 377 break;
378 }else if( info.isFile() ){ 378 }else if( info.isFile() ){
379 addFile( fi, TRUE ); 379 addFile( fi, TRUE );
380 break; 380 break;
381 }else if( info.isSymLink() ){ 381 }else if( info.isSymLink() ){
382 file = info.readLink() ; 382 file = info.readLink() ;
383 break; 383 break;
384 }else if( i == 4){ // couldn't resolve symlink add it as symlink 384 }else if( i == 4){ // couldn't resolve symlink add it as symlink
385 addSymlink( fi ); 385 addSymlink( fi );
386 } 386 }
387 } // off for loop for symlink resolving 387 } // off for loop for symlink resolving
388 }else if( fi->isDir() ) 388 }else if( fi->isDir() )
389 addDir( fi ); 389 addDir( fi );
390 else if( fi->isFile() ) 390 else if( fi->isFile() )
391 addFile( fi ); 391 addFile( fi );
392 392
393 ++it; 393 ++it;
394 } // of while loop 394 } // of while loop
395 m_view->sort(); 395 m_view->sort();