This project has moved and is read-only. For the latest updates, please go here.

MakeRelativeTo() and "Path must be rooted to be made relative."


I use Fluent.Zip that uses MakeRelativeTo() method to construct the package. I need to pass a FullPath to my method calls to avoid this exception. Don't you think it will be easier to do it in MakeRelativeTo() ?

For instance:
var path = new Path("c:\\temp").Combine("subdir", "subdir2");
var destination = "c:\\temp\\";

path.Zip(destination); // raises an exception
new Path(path.FullName).Zip(destination); //do not raise an exception
if not (but why not), have a more fluent way to do it:
What do you think about it ?


PlasmaSoft wrote Sep 12, 2014 at 5:45 PM

I have added a unit test to raise the problem : changeset 162828b56f8c