summaryrefslogtreecommitdiff
path: root/noncore/apps
authorllornkcor <llornkcor>2002-05-01 23:22:28 (UTC)
committer llornkcor <llornkcor>2002-05-01 23:22:28 (UTC)
commit21ddb4ef8f53ac003836535708736b91fd2c9f57 (patch) (unidiff)
tree116dd5b31b95b457c7331000be5d5f2a9624a8ee /noncore/apps
parenta3397118d3c384655bedb40210db96ca34adc0c9 (diff)
downloadopie-21ddb4ef8f53ac003836535708736b91fd2c9f57.zip
opie-21ddb4ef8f53ac003836535708736b91fd2c9f57.tar.gz
opie-21ddb4ef8f53ac003836535708736b91fd2c9f57.tar.bz2
fixed symlink showing linked file instead of name of symlink.
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index a9ba3c2..a378170 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -292,13 +292,13 @@ void AdvancedFm::populateLocalView()
292 while ( (fi=it.current()) ) { 292 while ( (fi=it.current()) ) {
293 if (fi->isSymLink() ) { 293 if (fi->isSymLink() ) {
294 QString symLink=fi->readLink(); 294 QString symLink=fi->readLink();
295// qDebug("Symlink detected "+symLink); 295// qDebug("Symlink detected "+symLink);
296 QFileInfo sym( symLink); 296 QFileInfo sym( symLink);
297 fileS.sprintf( "%10li", sym.size() ); 297 fileS.sprintf( "%10li", sym.size() );
298 fileL.sprintf( "%s -> %s", sym.fileName().data(),sym.absFilePath().data() ); 298 fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() );
299 fileDate = sym.lastModified().toString(); 299 fileDate = sym.lastModified().toString();
300 } else { 300 } else {
301 fileS.sprintf( "%10li", fi->size() ); 301 fileS.sprintf( "%10li", fi->size() );
302 fileL.sprintf( "%s",fi->fileName().data() ); 302 fileL.sprintf( "%s",fi->fileName().data() );
303 fileDate= fi->lastModified().toString(); 303 fileDate= fi->lastModified().toString();
304 if( QDir(QDir::cleanDirPath( currentDir.canonicalPath()+"/"+fileL)).exists() ) { 304 if( QDir(QDir::cleanDirPath( currentDir.canonicalPath()+"/"+fileL)).exists() ) {
@@ -413,13 +413,13 @@ void AdvancedFm::populateRemoteView()
413 while ( (fi=it.current()) ) { 413 while ( (fi=it.current()) ) {
414 if (fi->isSymLink() ){ 414 if (fi->isSymLink() ){
415 QString symLink=fi->readLink(); 415 QString symLink=fi->readLink();
416// qDebug("Symlink detected "+symLink); 416// qDebug("Symlink detected "+symLink);
417 QFileInfo sym( symLink); 417 QFileInfo sym( symLink);
418 fileS.sprintf( "%10li", sym.size() ); 418 fileS.sprintf( "%10li", sym.size() );
419 fileL.sprintf( "%s -> %s", sym.fileName().data(),sym.absFilePath().data() ); 419 fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() );
420 fileDate = sym.lastModified().toString(); 420 fileDate = sym.lastModified().toString();
421 } else { 421 } else {
422// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); 422// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL);
423 fileS.sprintf( "%10li", fi->size() ); 423 fileS.sprintf( "%10li", fi->size() );
424 fileL.sprintf( "%s",fi->fileName().data() ); 424 fileL.sprintf( "%s",fi->fileName().data() );
425 fileDate= fi->lastModified().toString(); 425 fileDate= fi->lastModified().toString();
@@ -437,16 +437,15 @@ void AdvancedFm::populateRemoteView()
437 if(isDir || fileL.find("/",0,TRUE) != -1) { 437 if(isDir || fileL.find("/",0,TRUE) != -1) {
438 if( !QDir( fi->filePath() ).isReadable()) 438 if( !QDir( fi->filePath() ).isReadable())
439 pm = Resource::loadPixmap( "lockedfolder" ); 439 pm = Resource::loadPixmap( "lockedfolder" );
440 else 440 else
441 pm= Resource::loadPixmap( "folder" ); 441 pm= Resource::loadPixmap( "folder" );
442// item->setPixmap( 0,pm ); 442// item->setPixmap( 0,pm );
443 } else if( (fileInfo.permission( QFileInfo::ExeUser) 443 } else if( (fileInfo.permission( QFileInfo::ExeUser)
444 | fileInfo.permission( QFileInfo::ExeGroup) 444 | fileInfo.permission( QFileInfo::ExeGroup)
445 | fileInfo.permission( QFileInfo::ExeOther)) & fs.find("vfat",0,TRUE) == -1) { 445 | fileInfo.permission( QFileInfo::ExeOther)) & fs.find("vfat",0,TRUE) == -1) {
446 pm = Resource::loadPixmap( "exec");
447///// } else if(fileInfo.isExecutable()){ //is exec <<<< BROKEN!! 446///// } else if(fileInfo.isExecutable()){ //is exec <<<< BROKEN!!
448 pm = Resource::loadPixmap( "exec"); 447 pm = Resource::loadPixmap( "exec");
449// item->setPixmap( 0,pm); 448// item->setPixmap( 0,pm);
450 } else if( !fi->isReadable() ) { 449 } else if( !fi->isReadable() ) {
451 pm = Resource::loadPixmap( "locked" ); 450 pm = Resource::loadPixmap( "locked" );
452// item->setPixmap( 0,pm); 451// item->setPixmap( 0,pm);
@@ -1344,16 +1343,16 @@ void AdvancedFm::move() {
1344} 1343}
1345 1344
1346void AdvancedFm::runCommand() { 1345void AdvancedFm::runCommand() {
1347 QString curFile; 1346 QString curFile;
1348 if (TabWidget->currentPageIndex() == 0) { 1347 if (TabWidget->currentPageIndex() == 0) {
1349 if( Local_View->currentItem()) 1348 if( Local_View->currentItem())
1350 curFile = currentDir.canonicalPath() + Local_View->currentItem()->text(0); 1349 curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0);
1351 } else { 1350 } else {
1352 if(Remote_View->currentItem()) 1351 if(Remote_View->currentItem())
1353 curFile = currentRemoteDir.canonicalPath() + Remote_View->currentItem()->text(0); 1352 curFile = currentRemoteDir.canonicalPath() + "/"+Remote_View->currentItem()->text(0);
1354 } 1353 }
1355 1354
1356 InputDialog *fileDlg; 1355 InputDialog *fileDlg;
1357 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); 1356 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
1358 fileDlg->setInputText(curFile); 1357 fileDlg->setInputText(curFile);
1359 fileDlg->exec(); 1358 fileDlg->exec();