From ae1ddf0aa43103b66c37cbfa6303d65bb3ba5f01 Mon Sep 17 00:00:00 2001 From: Jason Ferrara Date: Wed, 9 May 2012 21:49:30 +0000 Subject: [PATCH] Fix bug where no error message was displayed if an mtp device couldn't be found. --- src/jmtpfs.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/jmtpfs.cpp b/src/jmtpfs.cpp index 056f2df..9278f1e 100644 --- a/src/jmtpfs.cpp +++ b/src/jmtpfs.cpp @@ -402,6 +402,30 @@ int main(int argc, char *argv[]) } else { + bool foundDevice = 0; + ConnectedMtpDevices devices; + if (devices.NumDevices()==0) + { + std::cerr << "No mtp devices found." << std::endl; + return -1; + } + for(int i = 0; i(new MtpMetadataCache); metadataCache = cache.get(); }