changeset 228:f02989f7e160

...
author Chris Cannam
date Mon, 12 Feb 2007 13:09:31 +0000
parents e919a2b97c2a
children b176e99f9c38
files data/fileio/MP3FileReader.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/MP3FileReader.cpp	Mon Feb 12 11:46:31 2007 +0000
+++ b/data/fileio/MP3FileReader.cpp	Mon Feb 12 13:09:31 2007 +0000
@@ -66,8 +66,9 @@
 	return;
     }
     
-    if (::read(fd, filebuffer, stat.st_size) < stat.st_size) {
-	m_error = QString("Failed to read file %1.").arg(path);
+    size_t sz = 0;
+    if ((sz = ::read(fd, filebuffer, stat.st_size)) < stat.st_size) {
+	m_error = QString("Failed to read file %1 (expected %2 bytes, got %3 bytes).").arg(path).arg(stat.st_size).arg(sz);
         delete[] filebuffer;
         ::close(fd);
 	return;