bobvanderlinden / sharpfilesystem

A virtual file system for .NET written in C#
MIT License
285 stars 69 forks source link

GetEntities: "Path not rooted" exception #2

Closed blachniet closed 8 years ago

blachniet commented 9 years ago

When executing the code below with this zip, I get a ParseException ("Path is not rooted") from FileSystemPath.Parse. Am I using it wrong, or is this a bug?

        static void Main(string[] args)
        {
            using (var stream = System.IO.File.OpenRead("sample.zip"))
            using (var fs = SharpFileSystem.SharpZipLib.SharpZipLibFileSystem.Open(stream))
            {
                foreach (var e in fs.GetEntities(FileSystemPath.Root))
                {
                    Console.WriteLine(e.EntityName + " - " + e.Path);
                }
            }
            Console.ReadKey();
        }
FrozenCow commented 9 years ago

SharpZipLibFileSystem has not been used for quite a while. I've just pushed a number of unit tests, that cover your problem and fixed the problem in SharpZipLibFileSystem. Please close this issue if this fixes your problem as well.

blachniet commented 8 years ago

I'm sorry it took me so long to respond. The latest code is working great for me. Thanks!