[Libreoffice-bugs] [Bug 97379] Can not open .docx generated by BDoc

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 15 10:38:30 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=97379

Julien Nabet <serval2412 at yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |serval2412 at yahoo.fr

--- Comment #9 from Julien Nabet <serval2412 at yahoo.fr> ---
With this patch, I could open the file:
diff --git a/comphelper/source/misc/storagehelper.cxx
b/comphelper/source/misc/storagehelper.cxx
index f7180bdd230a..392d3963d5a9 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -572,7 +572,7 @@ bool OStorageHelper::IsValidZipEntryFileName(
     {
         switch ( pChar[i] )
         {
-            case '\\':
+//            case '\\':
             case '?':
             case '<':
             case '>':

The pb is bdoc generator created a zip file with '/', here is the output of
unzip:
   creating: docProps/
  inflating: docProps/app.xml        
  inflating: docProps/core.xml       
   creating: word/
  inflating: word/fontTable.xml      
   creating: word\media/
  inflating: word/numbering.xml      
  inflating: word/settings.xml       
   creating: word\theme/
  inflating: word/theme/theme1.xml   
  inflating: word/webSettings.xml    
   creating: word\_rels/
   creating: _rels/
  inflating: word/footnotes.xml      
  inflating: word/endnotes.xml       
  inflating: word/document.xml       
  inflating: word/_rels/document.xml.rels  
  inflating: [Content_Types].xml     
  inflating: _rels/.rels             
  inflating: word/styles.xml         

Quotation from zip spec
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT:
   4.4.17 file name: (Variable)

       4.4.17.1 The name of the file, with optional relative path.
       The path stored MUST NOT contain a drive or
       device letter, or a leading slash.  All slashes
       MUST be forward slashes '/' as opposed to
       backwards slashes '\' for compatibility with Amiga
       and UNIX file systems etc.  If input came from standard
       input, there is no file name field.

Perhaps we could be strict when writing a zip file and less strict when reading
one?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190815/5b0eca1d/attachment.html>


More information about the Libreoffice-bugs mailing list