incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon MacDonald <simon.macdon...@gmail.com>
Subject Re: Bug in FileSystem.js
Date Mon, 27 Feb 2012 12:24:06 GMT
I think we should make the change that Becky describe in point 1 of her
earlier email. It will need to be done in common-js then across the
platforms.

Simon Mac Donald
http://hi.im/simonmacdonald


On Fri, Feb 24, 2012 at 6:50 PM, Joe Bowser <bowserj@gmail.com> wrote:

> Hey
>
> I'm looking at this, and the more I think about it, the more I'm thinking
> that the name actually should be null if we're getting the directory
> entries of the Persistant and Temporary filesystems? I'm currently looking
> over that code again, and I'm not sure what should be correct. Any
> thoughts?
>
> Joe
>
> On Fri, Feb 24, 2012 at 1:42 PM, Joe Bowser <bowserj@gmail.com> wrote:
>
> > They shouldn't be able to read that directory anyway unless they rooted
> > their own phone.  We just need to be able to handle the error that it
> > throws, I think.
> >
> > Joe
> >
> >
> > On Fri, Feb 24, 2012 at 12:21 PM, Simon MacDonald <
> > simon.macdonald@gmail.com> wrote:
> >
> >> So then the root directory of the persistent filesystem should look
> like:
> >>
> >> { name: "", fullPath: "/data/data/com.phonegap" }
> >>
> >> then if I create a cache directory off the root it would be:
> >>
> >> { name: "cache", fullPath: "/data/data/com.phonegap/cache" }
> >>
> >> but what do we do about someone who goes back two directories? You would
> >> end up at:
> >>
> >> { name: "data", fullPath: "/data" }
> >>
> >> Do we need to prevent that type of behaviour?
> >>
> >> Simon Mac Donald
> >> http://hi.im/simonmacdonald
> >>
> >>
> >> On Fri, Feb 24, 2012 at 2:33 PM, Joe Bowser <bowserj@gmail.com> wrote:
> >>
> >> > No, I think you are partially right.  I think the name should be blank
> >> for
> >> > the root directory of the persistent storage.  It definitely shouldn't
> >> say
> >> > that it's persistent, that seems to be very wrong.
> >> >
> >> > Joe
> >> >
> >> > On Fri, Feb 24, 2012 at 11:10 AM, Simon MacDonald <
> >> > simon.macdonald@gmail.com
> >> > > wrote:
> >> >
> >> > > Becky has found a bug in FileSystem.js and I just wanted to bring
it
> >> up
> >> > > on the list before making any changes. At this line:
> >> > >
> >> > >
> >> > >
> >> >
> >>
> https://github.com/apache/incubator-cordova-js/blob/master/lib/plugin/FileSystem.js#L13
> >> > >
> >> > > you see a new DirectoryEntry is created using the *name* of the
> >> > filesystem
> >> > > and the *root* path of the filesystem. What is being passed in is
> >> > something
> >> > > like this:
> >> > >
> >> > > name = PERSISTENT
> >> > > root = /data/data/com.phonegap
> >> > >
> >> > > so when the DirectoryEntry is created it will have a name of
> >> > > *PERSISTENT*which is wrong. The name property should be the name of
> >> > > the file or
> >> > > *com.phonegap* in my example.
> >> > >
> >> > > Does this makes sense to everyone or are we going crazy?
> >> > >
> >> > > Simon Mac Donald
> >> > > http://hi.im/simonmacdonald
> >> > >
> >> >
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message