The problem seems to be an error in porting the native code from harmony to android. In harmony there's a method that should return a string where the roots are null separated and a second null at the end. http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c?view=co (method Java_java_io_File_rootsImpl)
<http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c?view=co>It seems like the android implementation just creates such a string but fails to process it correctly (which would get rid of the garbage at the end). http://android.git.kernel.org/?p=platform/dalvik.git;a=blob;f=libcore/luni/src/main/native/java_io_File.c;hb=HEAD#l55 -- Urs On Sat, Jun 13, 2009 at 9:23 PM, Urs Grob <grob....@gmail.com> wrote: > This looks like a bug. To not forget it again, please file a bug at > b.android.comBest would be if you could also attach some code that > reproduces the problem. > > Thanks for finding this (again) > > (Maybe this has to do with some code from harmony where also windows drives > could be returned ... "c:\" or something like that.) > > -- Urs > > On Sat, Jun 13, 2009 at 7:37 AM, Keith Wiley <kbwi...@gmail.com> wrote: > >> >> First I found the problem, then I found this truly ancient post: >> >> >> http://groups.google.com/group/android-developers/browse_thread/thread/a9f43a98632d5137/cd119afecd6fd403?lnk=gst&q=listroots#cd119afecd6fd403 >> >> ...with no responses. To browse the file system from the top down I >> suppose I can simply hardcode the root as a single slash, but I would >> rather "do it right". Can anyone explain why listRoots returns a root >> named "/XX" where X is a junk char? It's problematic because that >> file cannot subsequently be queried for further file system >> exploration. >> >> Thoughts? >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---