After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 154475 - Don't prompt to save missing (removed files)
Don't prompt to save missing (removed files)
Status: RESOLVED NOTABUG
Product: gedit
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
gedit QA volunteers
Depends on:
Blocks:
 
 
Reported: 2004-10-04 16:04 UTC by Stephen Kennedy
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stephen Kennedy 2004-10-04 16:04:12 UTC
To reproduce:

date > asdf; gedit asdf&; sleep 5; rm asdf
Quit gedit - you will be prompted to save asdf even though
you have no changes to it and have removed it.

Expected behaviour:

If the buffer has no changes, allow closing without a prompt.

If the buffer has changes, warn that the file has disappeared
and prompt to save or discard
Comment 1 Paolo Borelli 2004-10-04 18:40:07 UTC
If the file is deleted while it is open in gedit we give the user the chance to
save the contents. That's on purpose, then the user is free to chose "Do not
save". Why would you not have such behavior? 

bug #75861 contains some advice on how to improve the current solution.
Comment 2 Stephen Kennedy 2004-10-05 11:47:25 UTC
I strongly disagree with that use case.

1) It's not the editors job to prevent data loss when a file is removed - it is
likely that the user was already prompted to remove them in the first place. Why
would they want to be asked again? (It's not so bad with one file but I
frequently drop a folders contents to check if theres anything worth saving)

2) No other editor behaves that way. (probably because of (1)) I've tried vim,
xedit, anjuta, windows notepad, devstudio, even the gimp!

IMHO the correct solution is to warn the user in a non intrusive manner such as
changing the icon on the notebook tab and/or a status line message. The user
should only be prompted to save changes if they have made changes!
Comment 3 Janne 2004-12-10 13:59:50 UTC
What if the cause of the file's disappearance is that the volume it resides on
has been unmounted, or if it has been opened through the vfs layer? You would
reasonably want to be alerted so that you can squirrel away a copy so you won't
have to redo the work again later.