bugGNU nano - Bugs: bug #61146, saving a new buffer does not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61146: saving a new buffer does not create a lock file

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 12 Sep 2021 07:50:16 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 07 Oct 2021 07:32:29 AM UTC, comment #2: 

Released in nano-5.9.

Benno Schulenberg <bens>
Group administrator
Sun 12 Sep 2021 08:04:55 AM UTC, comment #1: 

Fixed in git, commit 5cedb53c, by writing a lock file whenever LOCKING is true, not just when a lock file existed previously.

Benno Schulenberg <bens>
Group administrator
Sun 12 Sep 2021 07:50:16 AM UTC, original submission:  

To reproduce, run

src/nano --ignore --locking --suspend

and type: xxx ^O name <Enter> ^Z
Check if there is a lock file: ls .*swp
Result: there is none.

This issue has been reported before, in bug #47975, and there I claimed having fixed it with commit 497f126b.  But that commit fixed only the saving-under-a-different-name case, not the case of saving a still nameless buffer...

I think I know what happened: I had the correct code at first, and after testing thought that 'ISSET(LOCKING)' can only be true when 'lock_filename' is not NULL, and folded the call of 'do_lockfile()' into the first 'if'.  Which is wrong, because 'lock_filename' can be NULL when there is no filename, even though LOCKING is true.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-07 bens Open/ClosedOpen Closed
    2021-09-12 bens StatusIn Progress Fixed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code