summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-09-02 12:20:44 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-09-02 12:20:44 +0000
commitb2e651dbc874ba4f00bd46430a9b73dad54f95c2 (patch)
treef92718f48dc305c064f76329b1cfa4c87696670a /rbutil
parent20444c47a8b25ed4193a44023d404324ebd762c5 (diff)
downloadrockbox-b2e651dbc874ba4f00bd46430a9b73dad54f95c2.tar.gz
rockbox-b2e651dbc874ba4f00bd46430a9b73dad54f95c2.zip
- check for specific files / folders case-insensitive
- linux: when detecting the mountpoint only accept vfat drives git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14578 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/autodetection.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp
index 59b3373f19..f29df535ab 100644
--- a/rbutil/rbutilqt/autodetection.cpp
+++ b/rbutil/rbutilqt/autodetection.cpp
@@ -73,34 +73,34 @@ bool Autodetection::detect()
// check for some specific files in root folder
QDir root(mountpoints.at(i));
QStringList rootentries = root.entryList(QDir::Files);
- if(rootentries.contains("archos.mod", Qt::CaseSensitive))
+ if(rootentries.contains("archos.mod", Qt::CaseInsensitive))
{
// archos.mod in root folder -> Archos Player
m_device = "player";
m_mountpoint = mountpoints.at(i);
return true;
}
- if(rootentries.contains("ONDIOST.BIN"))
+ if(rootentries.contains("ONDIOST.BIN"), Qt::CaseInsensitive)
{
// ONDIOST.BIN in root -> Ondio FM
m_device = "ondiofm";
m_mountpoint = mountpoints.at(i);
return true;
}
- if(rootentries.contains("ONDIOSP.BIN"))
+ if(rootentries.contains("ONDIOSP.BIN"), Qt::CaseInsensitive)
{
// ONDIOSP.BIN in root -> Ondio SP
m_device = "ondiosp";
m_mountpoint = mountpoints.at(i);
return true;
}
- if(rootentries.contains("ajbrec.ajz"))
+ if(rootentries.contains("ajbrec.ajz"), Qt::CaseInsensitive)
{
qDebug() << "it's an archos. further detection needed";
}
// detection based on player specific folders
- QStringList rootfolders = root.entryList(QDir::Dirs);
- if(rootfolders.contains("GBSYSTEM"))
+ QStringList rootfolders = root.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
+ if(rootfolders.contains("GBSYSTEM"), Qt::CaseInsensitive)
{
// GBSYSTEM folder -> Gigabeat
m_device = "gigabeatf";
@@ -111,7 +111,7 @@ bool Autodetection::detect()
}
}
-
+
int n;
//try ipodpatcher
struct ipod_t ipod;
@@ -180,7 +180,8 @@ QString Autodetection::resolveMountPoint(QString device)
struct mntent *ent;
while((ent = getmntent(mn))) {
- if(QString(ent->mnt_fsname).startsWith(device)) {
+ if(QString(ent->mnt_fsname).startsWith(device)
+ && QString(ent->mnt_type).contains("vfat", Qt::CaseInsensitive)) {
endmntent(mn);
return QString(ent->mnt_dir);
}