-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 22 |
1 files changed, 16 insertions, 6 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 - pm = Resource::loadPixmap( "exec"); -// item->setPixmap( 0,pm); + } 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 { //is exec +// pm = Resource::loadPixmap( "exec"); +// } +// // item->setPixmap( 0,pm); } else if( !fi->isReadable() ) { @@ -334,3 +339,3 @@ void AdvancedFm::populateLocalView() item->setPixmap( 0,pm); - if( fi->isSymLink() &&fileL.find("->",0,TRUE) != -1) { + if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) { // overlay link image @@ -426,2 +431,3 @@ void AdvancedFm::populateRemoteView() } + QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); if(fileL !="./" && fi->exists()) { @@ -436,4 +442,8 @@ void AdvancedFm::populateRemoteView() // item->setPixmap( 0,pm ); - } else if( fi->isExecutable() || fs == "vfat" && fi->filePath().contains("/bin") ) { - pm = Resource::loadPixmap( "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"); +///// } else if(fileInfo.isExecutable()){ //is exec <<<< BROKEN!! + pm = Resource::loadPixmap( "exec"); // item->setPixmap( 0,pm); |