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

Julien Nabet <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Julien Nabet <[email protected]> ---
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.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to