bugGNU nano - Bugs: bug #57066, puzzling error message when trying...

 
 

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

bug #57066: puzzling error message when trying to prepend to a directory

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 16 Oct 2019 05:03:42 PM UTC  
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Open

Fri 18 Oct 2019 10:19:12 AM UTC, comment #2: 

Fixed in git, commit 5390f969.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 18 Oct 2019 09:15:46 AM UTC, comment #1: 

The problem is that copy_file() can return two different error codes (-1 for a reading error, and -2 for a writing error) but all its callers don't look at the precise value: when it is nonzero, one assumes it is the reading part that went wrong, and two assume it is the writing part.

Differentiating between the two values is a nuisance, of course, but for correctness it needs to be done.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 16 Oct 2019 05:03:42 PM UTC, original submission:  

To reproduce, run:

  src/nano --ignore README

Then type: ^O ^K M-P doc <Enter>

Result: "[ Error writing temp file: Is a directory ]"

Strange!  Why would nano try to write a temp file onto something that is a directory?

Bug exists in this form since at least nano-2.4.3.  Version 2.4.1 and earlier would even segfault when trying this recipe.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-18 bens StatusNone => Fixed
    2019-10-18 bens Assigned toNone => bens

    Back to the top


    Powered by Savane 3.5