Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 7ee78c0..0f2555d 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -74,2 +74,3 @@ #include <mntent.h> +#include <sys/utsname.h> @@ -250,2 +251,13 @@ AdvancedFm::AdvancedFm( ) + struct utsname name; /* check for embedix kernel running on the zaurus*/ + if (uname(&name) != -1) { + QString release=name.release; + if(release.find("embedix",0,TRUE) !=-1) { + zaurusDevice=TRUE; + } else { + zaurusDevice=FALSE; + sdButton->hide(); + } + } + currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); @@ -1064,3 +1076,8 @@ void AdvancedFm::SDButtonPushed() { void AdvancedFm::CFButtonPushed() { - QString current = "/mnt/cf"; + QString current; + if(zaurusDevice) + current= "/mnt/cf"; + else + current = "/mnt/hda"; + chdir( current.latin1() ); |