summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/autodetection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/autodetection.cpp')
-rw-r--r--rbutil/rbutilqt/autodetection.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp
index e8eb498d62..7fe1a72692 100644
--- a/rbutil/rbutilqt/autodetection.cpp
+++ b/rbutil/rbutilqt/autodetection.cpp
@@ -52,11 +52,11 @@ bool Autodetection::detect()
}
}
}
-
+ int n;
+
//try ipodpatcher
struct ipod_t ipod;
-
- int n = ipod_scan(&ipod);
+ n = ipod_scan(&ipod);
if(n == 1) {
qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
m_device = ipod.targetname;
@@ -65,7 +65,14 @@ bool Autodetection::detect()
}
//try sansapatcher
-
+ struct sansa_t sansa;
+ n = sansa_scan(&sansa);
+ if(n == 1) {
+ qDebug() << "Sansa found:" << "sansae200" << "at" << sansa.diskname;
+ m_device = "sansae200";
+ m_mountpoint = resolveMountPoint(sansa.diskname);
+ return true;
+ }
return false;
}
@@ -119,6 +126,7 @@ QString Autodetection::resolveMountPoint(QString device)
QString directory = dir;
free( dev );
free( dir );
+ fclose(fp);
return directory;
}
free( dev );