! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Partial data loss when partition is full
Status:
RESOLVED: DUPLICATE
Product:
Mousepad
Component:
General

Comments

Description Roland Baudin 2020-05-07 09:56:50 CEST
When the partition is full, attempting to save a file in Mousepad results in a partial file loss.

Mousepad version : 0.4.2
System : Ubuntu Linux 20.04 LTS

To reproduce :

1. Fill some partition until there is no space left on it. For example :
fallocate -l 100G bigfile

2. Edit a text file located in the full partition and add some character to it

3. Try to save the file. Mousepad says there is no space left on device. Exit Mousepad.

4. The edited file size is now less than the original and the file was truncated, with a loss of data
Comment 1 Matthew Brush editbugs 2020-05-07 17:23:13 CEST
What is the actual/complete error message you receive?

Does it mark the file as having been saved, or does it keep it as dirty so it prompts you to save it when exiting?
Comment 2 Roland Baudin 2020-05-07 17:51:55 CEST
The dialog says:

"Failed to save the document. No space left on device. And there is a Close button.

Then when exiting Mousepad, there is a dialog that says:

"Do you want to save the changes before closing?" with three options: Don't save, Cancel and Save.

Clicking on the "Don't save" option results in a truncated file.
Comment 3 Matthew Brush editbugs 2020-05-08 01:44:57 CEST
Ok, that's not too bad then since it prompts again to save when exiting. Perhaps the error message should be more explicit, like:

> Failed while saving the document. No space left on device.
> File on disk may be truncated or corrupted, make sure to save
> the document to a different location to avoid data loss.
Comment 4 Roland Baudin 2020-05-08 10:12:49 CEST
Yes, a more explicit message would be better.

But why not checking the available space (using statvfs() for example) before attempting to save the file?
Comment 5 Theo Linkspfeifer editbugs 2020-05-22 11:44:28 CEST
Is this issue related to or a duplicate of bug 8754?
Comment 6 Roland Baudin 2020-05-22 15:57:24 CEST
Yes, it seems to me that's the same problem.
Comment 7 Theo Linkspfeifer editbugs 2020-05-22 21:39:19 CEST

*** This bug has been marked as a duplicate of bug 8754 ***

Bug #16810

Reported by:
Roland Baudin
Reported on: 2020-05-07
Last modified on: 2020-05-22

People

Assignee:
Matthew Brush
CC List:
0 users

Version

Version:
Unspecified
Target Milestone:
Mousepad 0.4.x

Attachments

Additional information