This project has moved. For the latest updates, please go here.
1
Vote

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

description

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\\package.zip";

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:
path.MakeAbsolute().Zip(destination);
What do you think about it ?

comments

PlasmaSoft wrote Sep 12, 2014 at 4:45 PM

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