javacommons/fileutils/src.s60/filesystemutils.cpp
branchRCL_3
changeset 71 d5e927d5853b
parent 66 2455ef1f5bbc
child 83 26b2b12093af
--- a/javacommons/fileutils/src.s60/filesystemutils.cpp	Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/fileutils/src.s60/filesystemutils.cpp	Tue Sep 14 21:06:50 2010 +0300
@@ -25,6 +25,7 @@
 #include "s60filesystemutilities.h"
 #include "javasymbianoslayer.h"
 
+#define BUF_LEN 255
 using namespace std;
 using namespace java::util;
 using namespace java::fileutils;
@@ -94,8 +95,9 @@
 OS_EXPORT std::wstring FileUtilities::listRoots()
 {
     JELOG2(EJavaFile);
-    TDesC16 aDes(S60FileSystemUtilities::GetSupportedDrives());
-    std::wstring retString((wchar_t*)aDes.Ptr());
+    TBuf<BUF_LEN> buf;
+    buf.Copy(S60FileSystemUtilities::GetSupportedDrives());    
+    std::wstring retString((wchar_t*)buf.Ptr());
     return retString;
 }