Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET why get "access is denied c:\\system volume info" ??

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19478 |

    I’m using xceed for zip net 2.2 on windows XP with all latest updates, also beta version visual studio 2005 2.0.50215 for C#

    of course my C# code runs OK

    but I’m trying to use this quickzip stuff like

    using Xceed.Zip;

    string[] files = null;

    files = new string[1];
    files[0] = “c:\\dummy.txt”;

    Xceed.Zip.Licenser.LicenseKey = “????”;

    QuickZip.Zip(“e:\\pac1.zip”,files);

    and the quickzip throws exception

    e.message something like “access to the path c:\\system volume info is denied”

    why ???????

    this C# code seems to match doc

    is this xceed for zip supported for .net 2 beta ?

    am I calling something wrong ?

    the dummy.txt file is writeable, not hidden, not system, not read-only etc

    I tried moving to e: drive, same throw

    I checked using licenser thing & it says I have “site license” for my key

    Imported from legacy forums. Posted by greghop (had 3423 views)

    User (Old forums)
    Member
    Post count: 23064

    yikes

    after more poking thru doc I found this little gem blurb buried somewhere

    Remarks
    When recursively adding files to a zip file, you have to consider every filename you place in the filesToZip parameter as a filemask. For example, if you set the filesToZip parameter to “c:\file.txt”, the entire “c:\” drive will be scanned and all the files that are named “file.txt” that are found will be included in the zip file.

    so if I passed a filepath with more info that top level directory, it works !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Imported from legacy forums. Posted by greghop (had 231 views)

    User (Old forums)
    Member
    Post count: 23064

    Method overloads are indeed thicky. It’s tough to make it obvious how an overload behaves compared to others. Purists would even suggest we get rid of simpler overloads, and force people to pass every possible parameter, relevant or not.

    Xceed Zip ActiveX is non-recursive by default. Maybe it should have been the same for QuickZip.Zip overloads that don’t take the “bool recursive” parameter.

    I’ll add a note about clarifying this behavior in the documentation.

    Imported from legacy forums. Posted by Martin (had 173 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks !!

    I mostly copied the code snippet in the help at the “quickzip vs. filesystem” entry near the top of the TOC for subsection “zip method vs. filesystem” and that’s how I got this error

    the blurb about filemask for recursive is buried down underneath the “task based help” entry in the subsection “zipping” and then “zipping (quickzip)”

    but regardless of where it’s documented, it seems like a gotcha feature for the same parameter to be both an input file and also a mask if & only if the file name is at the top level drive ? or however that works

    I eventually had to use the full API because the quickzip for “save file paths” not only saves the file paths from the starting path down it also saves the file paths from the top level drive down to the starting path. This doesn’t match winzip gui where when I check the “save paths” box, it only saves the paths from the starting path down (but who cares right 🙂 )

    ex: if my starting path to zip is c:\misc\ex1

    then saving paths from the starting path down would only save the paths in the zip for directories underneath ex1

    saving paths from the top level drive down to the starting path saves the \misc\ex1 for all files at the ex1 level

    this is a side-effect of only having 1 “save paths” parm for quickzip I guess

    and since I needed the other way I had to use the full API, which was only 2 lines instead of 1 line of code but required me to dig thru the doc

    and another minor oddity about quickzip, when I passed in path like c:\misc it did not copy the files from the misc directory into the zip, but if I passed in path like c:\misc\ it does copy the files from the misc directory into the zip

    but it all works so that’s what really matters 🙂 🙂

    Imported from legacy forums. Posted by greghop (had 4063 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.