Hello
I am trying to update a zip archive and I am getting an error "The relative name cannot be an absolute path.
Parameter name: relativeName". What am I doing wrong? The _documentFolder is valid and points back to the folder
in the zip file where the file was extracted from. Below is the source code which is currently being used. The file name
which I am trying to replace is called document.xml.
Regards,
Simon
// Initialize Class
this._updatedDocumentFile = new MemoryFile();
// Assign Value
this._updatedDocumentFile.Name = "document.xml";
// Create
using (Stream stream = this._updatedDocumentFile.CreateWrite())
{
// Assign Value
this._documentFileBuffer = ASCIIEncoding.ASCII.GetBytes(this._documentFileStringBuilder.ToString());
// Write
stream.Write(this._documentFileBuffer,
0,
this._documentFileBuffer.Length);
}
// Copy
this._updatedDocumentFile.MoveTo(this._documentFolder,
true);