[Mono-devel-list] GetFolderPath: Should it create the directories it returns?

Jackson Harper jackson at ximian.com
Sun Apr 25 21:28:06 EDT 2004


Maybe we could create these directories as part of our installation
script. That way we keep compatibility and make things work.

Jackson

On Sun, 2004-04-25 at 17:58, Sebastien Pouliot wrote:
> Hello Simon,
> 
> > What does the MS equiv do?
> 
> Microsoft implementation doesn't create the directories.
> That's why the current code doesn't create them either ;-)
> 
> 
> > That's exactly the kind of routine that could break a LOT of
> cross-compatibility
> > apps (or at least make them behave in unexpected ways)
> 
> Agreed. This is why I think this is a case where 100% compatibility may be
> more a problem than a solution.
> Why ? Because (most versions of) Windows already have (most of) the
> directories created (and they are kind of hard to remove).
> 
> Sadly this means that most existing user code doesn't check for a directory
> existance before using it. So we may end up breaking things (not fixing
> them) by being compatible.
> 
> 
> 
> Miguel,
> 
> >>The check for the directory should only be done
> >>once per kind of directory, and not on every invocation.
> 
> This may also be a problem.
> 
> Long-lived (e.g. iFolder) applications may create a path (using
> GetFolderPath(...) as their base) and use this path several times (possibly
> during several days). Another application (mono-based or not) could move or
> delete the directory during this time.
> 
> And no Windows doesn't really "suffer" from the same problem. This is
> because most of those directories are "hard" to delete on Windows (e.g.
> Explorer track them when you move them) and once deleted they don't come
> back easily either.
> 
> Sebastien Pouliot
> http://pages.infinit.net/ctech/poupou.html
> 
> 
> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Simon Dawson
> Sent: 25 avril 2004 18:04
> To: Miguel de Icaza
> Cc: mono-devel-list at ximian.com
> Subject: Re: [Mono-devel-list] GetFolderPath: Should it create the
> directories it returns?
> 
> 
> What does the MS equiv do?
> 
> That's exactly the kind of routine that could break a LOT of
> cross-compatibility
> apps (or at least make them behave in unexpected ways)
> 
> Simon
> 
> At 09:52 26/04/2004, you wrote:
> >Hey guys,
> >
> >    I think that GetFolderPath should create the directories it returns
> >if they do not exists.  The check for the directory should only be done
> >once per kind of directory, and not on every invocation.
> >
> >   Thoughts?
> >_______________________________________________
> >Mono-devel-list mailing list
> >Mono-devel-list at lists.ximian.com
> >http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list