Welcome to the Xceed Community | Help
Community Search  
More Search Options

The relative name cannot be an absolute path. Parameter name: relativeName

Sort Posts: Previous Next
  •  11-23-2011, 10:48 PM Post no. 31364

    The relative name cannot be an absolute path. Parameter name: relativeName

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

     

  •  12-06-2011, 3:58 PM Post no. 31413 in reply to 31364

    Re: The relative name cannot be an absolute path. Parameter name: relativeName

    Hi Simon,

    Which line of code is giving you the error?


    Marc

    Developer in Technical Support
    Xceed - Multi-talented components - http://xceed.com
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.