author | llornkcor <llornkcor> | 2002-05-01 02:24:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-01 02:24:51 (UTC) |
commit | 7e5615473c1d103db66f42ae60bf9ed57d52566c (patch) (side-by-side diff) | |
tree | 6074a903b03bb844c8d66edaa8d17ae068384288 /noncore | |
parent | 1f6f336326e74534f65f88fe0045946b3d9f6d94 (diff) | |
download | opie-7e5615473c1d103db66f42ae60bf9ed57d52566c.zip opie-7e5615473c1d103db66f42ae60bf9ed57d52566c.tar.gz opie-7e5615473c1d103db66f42ae60bf9ed57d52566c.tar.bz2 |
fixed a workaround for QFileInfo::isExecutable() stupid silly bug
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index ee3f736..a9ba3c2 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -320,5 +320,10 @@ void AdvancedFm::populateLocalView() // item->setPixmap( 0,pm ); - } else if( fileInfo.isExecutable() || fs == "vfat" && fi->filePath().contains("/bin") ) { //is exec + } else if( (fileInfo.permission( QFileInfo::ExeUser) + | fileInfo.permission( QFileInfo::ExeGroup) + | fileInfo.permission( QFileInfo::ExeOther)) & fs.find("vfat",0,TRUE) == -1) { pm = Resource::loadPixmap( "exec"); -// item->setPixmap( 0,pm); +// else { //is exec +// pm = Resource::loadPixmap( "exec"); +// } +// // item->setPixmap( 0,pm); } else if( !fi->isReadable() ) { @@ -426,2 +431,3 @@ void AdvancedFm::populateRemoteView() } + QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); if(fileL !="./" && fi->exists()) { @@ -436,3 +442,7 @@ void AdvancedFm::populateRemoteView() // item->setPixmap( 0,pm ); - } else if( fi->isExecutable() || fs == "vfat" && fi->filePath().contains("/bin") ) { + } else if( (fileInfo.permission( QFileInfo::ExeUser) + | fileInfo.permission( QFileInfo::ExeGroup) + | fileInfo.permission( QFileInfo::ExeOther)) & fs.find("vfat",0,TRUE) == -1) { + pm = Resource::loadPixmap( "exec"); +///// } else if(fileInfo.isExecutable()){ //is exec <<<< BROKEN!! pm = Resource::loadPixmap( "exec"); |