Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET The relative name cannot be an absolute path. Parameter name: relativeName

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Xceed Support
    Member
    Post count: 5658
    #20430 |

    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);

     

    Imported from legacy forums. Posted by Simon (had 831 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Simon,

    Which line of code is giving you the error?

    Imported from legacy forums. Posted by Marc [Xceed] (had 961 views)

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