Bug 244605 - Gedit Refuses to Immediately Save Files When Backups are Disabled
Summary: Gedit Refuses to Immediately Save Files When Backups are Disabled
Alias: None
Product: Fedora
Classification: Fedora
Component: gedit
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-06-18 02:19 UTC by Chris Spencer
Modified: 2008-11-26 13:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-11-26 13:33:27 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
GNOME Bugzilla 477070 None None None Never

Description Chris Spencer 2007-06-18 02:19:42 UTC
Description of problem:
If the user explicitly unchecks the option to create backup copies, Gedit
displays a warning complaining it cannot create a backup copy.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. Disable the creation of backup copies by going to Edit->Preferences, clicking
the Editor tab, and unchecking the "Create a backup copy of files before saving"
2. Close Gedit and reopen a text file with Gedit.
3. Press "Save".
Actual results:
File should be saved.

Expected results:
File is not saved and an in-window banner is displayed with the warning message
"Could not create a temporary backup file while saving <filename>. It also gives
you the option to "Save Anyway" or "Don't Save".

It's pointless to break the save button while telling the user that backups
haven't been created, because the user was the one who explicitly disabled
backup copies, presumably because they don't want their directories littered
with ~<filename> files.

Comment 1 Dennis Jacobfeuerborn 2007-06-23 18:56:35 UTC
I'm having the same problem and it is currently making my life quite painful.

Comment 2 Dennis Jacobfeuerborn 2007-06-23 19:22:15 UTC
After digging into the code here is a workaround until the problem is fixed

Get the source rpm, unpack the source, go into gedit/gedit-document-saver.c and
comment out the if-block following the comment "copy the xattrs, like
user.mime_type, over. Also ACLs and SELinux context." Then recompile gedit.

This doesn't fix the actual problem but since I have no need for ACLs and
SELinux that does the trick for now.

Comment 3 Dennis Jacobfeuerborn 2007-09-14 23:36:52 UTC
I filed this upstream with additional information:
(short summary: the attr_copy_fd() call fails with an errno code of EPERM for no
apparent reason)

Comment 4 Chris Spencer 2008-02-13 12:38:45 UTC
I wasn't having this problem in Fedora 8 until I completely disabled SELinux. 

Comment 5 Nicola Soranzo 2008-02-13 15:05:56 UTC
(In reply to comment #4)
> I wasn't having this problem in Fedora 8 until I completely disabled SELinux. 

In fact, as I mentioned in the upstream bug opened by Dennis J., it's the
combination SELinux disabled & libattr installed that causes the
problem with attr_copy_fd().

Comment 6 Bug Zapper 2008-11-26 07:20:53 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Note You need to log in before you can comment on or make changes to this bug.