Minor fix in HttpEventHandler for file paths without drive letter RCL_3
authorSebastian Brannstrom <sebastianb@symbian.org>
Sat, 30 Oct 2010 11:28:49 +0100
branchRCL_3
changeset 305 dc1c3d779802
parent 304 9d25c062a380
child 306 a36dc474cae2
Minor fix in HttpEventHandler for file paths without drive letter
engine/inc/Podcatcher.pan
engine/src/HttpEventHandler.cpp
--- a/engine/inc/Podcatcher.pan	Fri Oct 29 00:14:36 2010 +0100
+++ b/engine/inc/Podcatcher.pan	Sat Oct 30 11:28:49 2010 +0100
@@ -24,7 +24,8 @@
     EPodcatcherPanicDB = 1,
     EPodcatcherPanicAlreadyActive,
     EPodcatcherPanicFeedEngineState,
-    EPodcatcherPanicFeedView
+    EPodcatcherPanicFeedView,
+    EPodcatcherDownloadDrive
     };
 
 
--- a/engine/src/HttpEventHandler.cpp	Fri Oct 29 00:14:36 2010 +0100
+++ b/engine/src/HttpEventHandler.cpp	Sat Oct 30 11:28:49 2010 +0100
@@ -23,6 +23,7 @@
 #include "HttpEventHandler.h"
 #include "bautils.h"
 #include "Httpclient.h"
+#include "Podcatcher.pan"
 
 const TInt64 KMinDiskSpace = 1024 * 1024; // at least 1 MB must remain
 
@@ -61,7 +62,7 @@
 
 void CHttpEventHandler::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
 	{
-	DP1("CHttpEventHandler::MHFRunL, aEvent.iStatus=%d", aEvent.iStatus);
+	//DP1("CHttpEventHandler::MHFRunL, aEvent.iStatus=%d", aEvent.iStatus);
 	switch (aEvent.iStatus)
 		{
 		case THTTPEvent::EGotResponseHeaders:
@@ -259,6 +260,7 @@
 	switch(fName[0])
 		{
 		case 'C':
+		case '\\':
 			iDriveNo = EDriveC;
 			break;
 		case 'E':
@@ -271,7 +273,7 @@
 			iDriveNo = EDriveG;
 			break;
 		default:
-			iDriveNo = -1;
+			Panic(EPodcatcherDownloadDrive);
 			break;
 		}
 	DP1("iDriveNo set to %d", iDriveNo);