Bug on SharpZipLib.WindowsPhone7

Oct 7, 2010 at 5:38 PM

Hi. Thanks for the porting.

I found an issue when zipping files into a subdirectory within the isolated storage.

Occurs at line:

 

using (var stream = store.OpenFile(e.Name, FileMode.Open, FileAccess.Read, FileShare.Read))

 

at IsolatedFastZip.cs

Workaround:

I added a 2nd constructor to ScanEventArgs at FileSystemScanner.cs:

 

        public ScanEventArgs(string directory,string name)
        {
            directory_ = directory;
            name_ = name;
        }

 

Then used that arg class on OnProcessFile(string directory, string file) so I can pass in the directory name.

Then changed:

 

using (var stream = store.OpenFile(e.Name, FileMode.Open, FileAccess.Read, FileShare.Read))

 

For:

 

using (var stream = store.OpenFile(e.Direcory + "\\" + e.Name, FileMode.Open, FileAccess.Read, FileShare.Read))

 

 

Don't know if this covers all scenarios but working on mine.

Regards,

JD