On Fri, Sep 26, 2008 at 5:58 AM, Eric Kow <[EMAIL PROTECTED]> wrote: >> > Thu Sep 25 21:57:11 MSD 2008 Dmitry Kurochkin <[EMAIL PROTECTED]> >> > * Make FileName.drop_dotdot work with absolute paths. >> >> Looks safe, although I'd prefer to move in the direction of not using >> the FileName code in the RepoPath module, and to move back to only >> using FileName for paths within a repository (which is what it was >> written for). > > Thanks for clarifying that! > > I thought that was the case (in which case, by rights the FileName code > should neither absolute paths nor "../foo/bar" (although "foo/../bar" > should be ok). > > After 2.1.0, we really ought to tidy up our file path handling and make > more of these assumptions explicit. It might be good to move FileName > into Darcs.Repository.FileName and also make sure that we are only using > SubPath within a repository. Slurpies should probably also only be > using SubPath.
I already put a start into tidying up the file path handling, and that's what has caused all this trouble. I want to move towards using AbsolutPath, etc throughout the code more, so that we can use the compiler to enforce reasonable coding practice. Yes, moving FileName into Darcs.Patch would be a good idea. Also good would be to remove the exports of fn2fp and fp2fn, which are the biggest problems with the FileName module. It might even be a good idea to start by simply duplicating the FileName module, so that we can modify it in the course of the refactor... David _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
