From 6dfc6f34420b8c9222d1c785efc950fc5031a7f0 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 02 May 2002 02:09:49 +0000 Subject: damned QFileInfo::isExecutable bug... --- (limited to 'noncore/apps') 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 @@ -730,9 +730,13 @@ QString fs; fs= getFileSystemType((const QString &) currentDir.canonicalPath()); QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); qDebug( fileInfo.owner()); - if( fileInfo.isExecutable() || fs == "vfat" && fileInfo.filePath().contains("/bin") ) { - QCopEnvelope e("QPE/System", "execute(QString)" ); - e << curFile; + if( (fileInfo.permission( QFileInfo::ExeUser) + | fileInfo.permission( QFileInfo::ExeGroup) + | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { + | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { +// if( fileInfo.isExecutable() | + QCopEnvelope e("QPE/System", "execute(QString)" ); + e << curFile; } else { curFile = currentDir.canonicalPath()+"/"+curFile; DocLnk nf(curFile); @@ -749,7 +753,10 @@ QString fs; fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); qDebug("Filesystemtype is "+fs); QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+curFile); - if(fileInfo.isExecutable() || fs == "vfat" && fileInfo.filePath().contains("/bin") ) { + if( (fileInfo.permission( QFileInfo::ExeUser) + | fileInfo.permission( QFileInfo::ExeGroup) + | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { + | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { QCopEnvelope e("QPE/System", "execute(QString)" ); e << curFile; } else { -- cgit v0.9.0.2