-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index e3ab76b..7cd8644 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -727,15 +727,19 @@ QString fs; | |||
727 | if (TabWidget->currentPageIndex() == 0) { | 727 | if (TabWidget->currentPageIndex() == 0) { |
728 | QString curFile = Local_View->currentItem()->text(0); | 728 | QString curFile = Local_View->currentItem()->text(0); |
729 | 729 | ||
730 | fs= getFileSystemType((const QString &) currentDir.canonicalPath()); | 730 | fs= getFileSystemType((const QString &) currentDir.canonicalPath()); |
731 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); | 731 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); |
732 | qDebug( fileInfo.owner()); | 732 | qDebug( fileInfo.owner()); |
733 | if( fileInfo.isExecutable() || fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | 733 | if( (fileInfo.permission( QFileInfo::ExeUser) |
734 | QCopEnvelope e("QPE/System", "execute(QString)" ); | 734 | | fileInfo.permission( QFileInfo::ExeGroup) |
735 | e << curFile; | 735 | | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { |
736 | | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | ||
737 | // if( fileInfo.isExecutable() | | ||
738 | QCopEnvelope e("QPE/System", "execute(QString)" ); | ||
739 | e << curFile; | ||
736 | } else { | 740 | } else { |
737 | curFile = currentDir.canonicalPath()+"/"+curFile; | 741 | curFile = currentDir.canonicalPath()+"/"+curFile; |
738 | DocLnk nf(curFile); | 742 | DocLnk nf(curFile); |
739 | QString execStr = nf.exec(); | 743 | QString execStr = nf.exec(); |
740 | qDebug( execStr); | 744 | qDebug( execStr); |
741 | if( execStr.isEmpty() ) { | 745 | if( execStr.isEmpty() ) { |
@@ -746,13 +750,16 @@ QString fs; | |||
746 | // MimeType mt( curFile); | 750 | // MimeType mt( curFile); |
747 | } else { | 751 | } else { |
748 | QString curFile = Remote_View->currentItem()->text(0); | 752 | QString curFile = Remote_View->currentItem()->text(0); |
749 | fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); | 753 | fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); |
750 | qDebug("Filesystemtype is "+fs); | 754 | qDebug("Filesystemtype is "+fs); |
751 | QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+curFile); | 755 | QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+curFile); |
752 | if(fileInfo.isExecutable() || fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | 756 | if( (fileInfo.permission( QFileInfo::ExeUser) |
757 | | fileInfo.permission( QFileInfo::ExeGroup) | ||
758 | | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { | ||
759 | | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | ||
753 | QCopEnvelope e("QPE/System", "execute(QString)" ); | 760 | QCopEnvelope e("QPE/System", "execute(QString)" ); |
754 | e << curFile; | 761 | e << curFile; |
755 | } else { | 762 | } else { |
756 | curFile = currentRemoteDir.canonicalPath()+"/"+curFile; | 763 | curFile = currentRemoteDir.canonicalPath()+"/"+curFile; |
757 | DocLnk nf(curFile); | 764 | DocLnk nf(curFile); |
758 | QString execStr = nf.exec(); | 765 | QString execStr = nf.exec(); |