Description of problem: When saving a file in nano, sometimes it thinks the file was modified outside of nano while you were editing it inside nano, and then it warns you "File was modified since you opened it, continue saving ?". Version-Release number of selected component (if applicable): nano-2.2.6-1.fc15.x86_64 How reproducible: almost always Steps to Reproduce: 1. create a new file and edit it with nano 2. modify the file inside nano 3. ctrl-o to save file, or ctrl-x, y to save and exit 4. try repeating 2-3 a couple times if it doesn't happen the first time Actual results: File was modified since you opened it, continue saving ? Y Yes N No ^C Cancel Expected results: Nothing modified the file since I opened it. It shouldn't ask. Additional info:
Please provide the output of stat(1) for the edited file: 1) before editing the file 2) before attempting to save the changes 3) after the dialog appears
Before editing file in nano: [install@l ~]$ stat test File: `test' Size: 451 Blocks: 8 IO Block: 4096 regular file Device: fd02h/64770d Inode: 262165 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ install) Gid: ( 500/ install) Context: unconfined_u:object_r:user_home_t:s0 Access: 2010-11-28 13:46:38.140528974 -0500 Modify: 2010-11-28 13:48:07.422529000 -0500 Change: 2010-11-28 13:48:07.422529000 -0500 Birth: - After opening file in nano but not making any changes: [install@l ~]$ stat test File: `test' Size: 451 Blocks: 8 IO Block: 4096 regular file Device: fd02h/64770d Inode: 262165 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ install) Gid: ( 500/ install) Context: unconfined_u:object_r:user_home_t:s0 Access: 2010-11-28 13:48:58.081529013 -0500 Modify: 2010-11-28 13:48:07.422529000 -0500 Change: 2010-11-28 13:48:07.422529000 -0500 Birth: - After not making any changes to the contents, but saving over the file anyway with Ctrl-o (no warning dialog appears for this save). Here is the stat after the save: [install@l ~]$ stat test File: `test' Size: 451 Blocks: 8 IO Block: 4096 regular file Device: fd02h/64770d Inode: 262165 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ install) Gid: ( 500/ install) Context: unconfined_u:object_r:user_home_t:s0 Access: 2010-11-28 13:48:58.081529013 -0500 Modify: 2010-11-28 13:49:11.858529298 -0500 Change: 2010-11-28 13:49:11.858529298 -0500 Birth: - After still not making any changes to the contents, but attempting to save over the file with Ctrl-o for a second time, the warning dialog appears and stat shows this before actually saving the file a second time: [install@l ~]$ stat test File: `test' Size: 451 Blocks: 8 IO Block: 4096 regular file Device: fd02h/64770d Inode: 262165 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ install) Gid: ( 500/ install) Context: unconfined_u:object_r:user_home_t:s0 Access: 2010-11-28 13:48:58.081529013 -0500 Modify: 2010-11-28 13:49:11.858529298 -0500 Change: 2010-11-28 13:49:11.858529298 -0500 Birth: -
Thanks, confirmed, will be fixed shortly.
Please try nano-2.2.6-2.fc15: http://koji.fedoraproject.org/koji/buildinfo?buildID=206774
Updated patches sent upstream: http://article.gmane.org/gmane.editors.nano.devel/2887 http://article.gmane.org/gmane.editors.nano.devel/2888
Haven't seen this problem anymore, must be fixed :-)
Great. Thanks for the feedback!