Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.2.1

Bug #13821 Saving with full path not possible
Submitted: 2008-05-02 10:54 UTC
From: oxy Assigned: cweiske
Status: Closed Package: OpenDocument (version 0.1.2)
PHP Version: 5.2.5 OS: Debian GNU/Linux sid
Roadmaps: 0.2.0    
Subscription  


 [2008-05-02 10:54 UTC] oxy (Elmar Athmer)
Description: ------------ If save() is called with an absoulute Path, the ZipWrapper prepends the working directory, if the file does not exist already. Because the resulting Path is not a dir, ZipArchive does not create the file. Consequently saving the ODT File fails. I should blame ZipArchive to not show any warning... Patch attached. Test script: --------------- $odt = new OpenDocument; $h = $odt->createHeading('Heading', 1); $p1 = $odt->createParagraph('Paragraph 1'); $p1->style->fontSize = '12pt'; $p1->style->fontName = 'Times New Roman'; $p2 = $odt->createParagraph('Paragraph 2'); $p2->style->copy($p1->style); $a1 = $p1->createHyperlink('Test link', 'http://www.example.com'); $odt->save("/home/user/php/project/data/temp/test.odt"); Expected result: ---------------- An ODT File should be saved to /home/user/php/project/data/temp/test.odt Actual result: -------------- No file created. ZipWrapper tries to create a Zip Archive /home/user/php/project/web//home/user/php/project/data/temp/test.odt in line 23.

Comments

 [2009-06-09 11:29 UTC] cweiske (Christian Weiske)
-Summary: getcwd in ZipWrapper causes OpenDocument not to save the document +Summary: Saving with full path not possible
 [2009-06-26 11:43 UTC] cweiske (Christian Weiske)
Will be fixed once 16373 is done - I am on it.
 [2009-06-30 14:12 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cweiske
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.