Download it now!
Bug 52561 - FILEOPEN: FILEOPEN on empty files results in a blank master document being written to the empty file.
Summary: FILEOPEN: FILEOPEN on empty files results in a blank master document being wr...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected) release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Depends on:
Reported: 2012-07-26 20:14 UTC by Greg M
Modified: 2013-12-12 15:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

This is the file after opening. (1.50 KB, text/csv)
2012-07-26 20:14 UTC, Greg M

Note You need to log in before you can comment on or make changes to this bug.
Description Greg M 2012-07-26 20:14:46 UTC
Created attachment 64753 [details]
This is the file after opening.

Problem description: 
Much like (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
Build ID: 7122e39-92ed229-498d286-15e43b4-d70da21Browser:
Comment 1 Greg M 2012-07-28 01:26:56 UTC
This is fixed on Version (Build ID: 815c576) of the Mac.
Comment 2 retired 2013-06-24 07:12:33 UTC
Setting to WORKSFORME as of Comment 1.

Greg M: Should this have returned with LO 4 in the meantime, please re-open this bug.
Comment 3 Greg M 2013-06-24 17:34:40 UTC
Still fixed as of LO