[ 
https://issues.apache.org/jira/browse/CB-7375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14110045#comment-14110045
 ] 

Ian Clelland commented on CB-7375:
----------------------------------

The File spec actually defines a circular reference in some of its data 
structures, which is the reason for the Android code being the way it is:

A FileEntry or DirectoryEntry object contains a .filesystem property, which is 
a FileSystem. A FileSystem contains a .root property, which is a 
DirectoryEntry. That then contains a FileSystem again, so it all gets circular 
very quickly.

Since we can't serialize that into JSON to return it from the native side of 
the bridge, instead we return a FileEntry structure with a file system name, 
rather than an actual object. Then, on the JavaScript side, we reconstruct the 
FileSystem object based on its name, and attach that to the Entry object.


> Investigate breaking changes at file plugin
> -------------------------------------------
>
>                 Key: CB-7375
>                 URL: https://issues.apache.org/jira/browse/CB-7375
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.5.0
>            Reporter: Martin Gonzalez
>            Assignee: Ian Clelland
>              Labels: file
>             Fix For: 3.6.0
>
>
> Some of the changes made lately to file plugin with this commit: 
> https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file.git;a=commit;h=0ffb96988c0539222887f7756a653e7f0a1ed12c
> Are breaking changes to this plugin, affecting other platforms as android.
> Running mobile spec after that specific commit, 4 file tests are failing 
> (test 125 -128).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to