Bug 244605

Summary: Gedit Refuses to Immediately Save Files When Backups are Disabled
Product: [Fedora] Fedora Reporter: Chris Spencer <chrisspen>
Component: geditAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: nsoranzo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-26 13:33:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
2.18.0

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"
option.
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
properly:

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:
http://bugzilla.gnome.org/show_bug.cgi?id=477070
(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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping