Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at

Bug 1177155

Summary: nano spurious failed backup warning
Product: [Fedora] Fedora Reporter: Don Swaner <Gecko8211>
Component: nanoAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: dwmw2, jaswinder, kdudka
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: nano-2.3.4-4.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-11 10:57:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Don Swaner 2014-12-24 15:42:15 UTC
Description of problem:
When the "set backup" option is set in .nanorc and a file is edited, when saving the file an error message appears "Failed to write backup file, continue saving? (say N if unsure)".  When "y" response is given, the file is saved.  Listing the directory shows that the backup file (same name as "file" with tilde appended), was indeed created, despite what the error message says.

Version-Release number of selected component (if applicable):
Name        : nano
Arch        : x86_64
Version     : 2.3.4
Release     : 3.fc21

How reproducible:

Steps to Reproduce:
1. edit .nanorc file to include "set backup"
2. edit an existing file
3. make some changes
4. save the file

Actual results:
spurious error message and prompt appear

Expected results:
file is saved and properly backed up without spurious message and prompt

Additional info:

Comment 1 Kamil Dudka 2015-01-05 13:06:22 UTC
Thank you for reporting the bug!

It is caused by calling futimens() on a descriptor that has been already closed by closing the owning FILE* handle in copy_file().  I will write a fix for this.

Comment 2 Kamil Dudka 2015-01-05 13:31:45 UTC
fixed in nano-2.3.6-3.fc22

Comment 3 Fedora Update System 2015-01-05 13:56:25 UTC
nano-2.3.4-4.fc21 has been submitted as an update for Fedora 21.

Comment 4 Fedora Update System 2015-01-06 06:14:30 UTC
Package nano-2.3.4-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nano-2.3.4-4.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-01-11 10:57:12 UTC
nano-2.3.4-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.