[Libreoffice-bugs] [Bug 52561] New: FILEOPEN: FILEOPEN on empty files results in a blank master document being written to the empty file.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 27 05:14:46 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52561

             Bug #: 52561
           Summary: FILEOPEN: FILEOPEN on empty files results in a blank
                    master document being written to the empty file.
    Classification: Unclassified
           Product: LibreOffice
           Version: 3.5.5.3 release
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
 Status Whiteboard: BSA
          Severity: normal
          Priority: medium
         Component: UI
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: gmatyola at hotmail.com


Created attachment 64753
  --> https://bugs.freedesktop.org/attachment.cgi?id=64753
This is the file after opening.

Problem description: 
Much like https://bugs.freedesktop.org/show_bug.cgi?id=46699 (this may be a
regression of that bug... opening an empty (0 byte) file causes a master file
to be silently written to the file location as soon as "CSV Filter" is invoked.
 Some formats (like PDF) give an error dialog (General Error), then exit more
properly.

Touch (or Copy NUL: >filename.csv) to create an empty file
Steps to reproduce:
1. Touch (or Copy NUL: >filename.csv) to create an empty file
2. Double-click to open the file in LibreOffice
3. Select CSV filter
4. File on disk will likely be an empty master document.

Current behavior:
Master Document is written to disk, even if the file is not saved. 

**While normally I'd say this is heinously dangerous, If this only happens with
empty files, it's only confusing.**
Expected behavior:

LibreOffice should _warn_ if you're opening an empty file and _ask_ if you want
to create a new file with that filename/path.

The file length should probably be checked _before_ we get to that filter
dialog.  If the file does not exist, or does exist, but has no length (or maybe
we don't have access to read the file!) this should probably be explained
better.

Platform (if different from the browser): 
Windows 7 32 Bit
LibreOffice 3.5.5.3 
Build ID: 7122e39-92ed229-498d286-15e43b4-d70da21Browser:

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list