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

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

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


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

Fixed in git, commit 5390f969.

Benno Schulenberg <bens>
Project Administrator
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 Administrator
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 Administrator


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

Attach Files:

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.

    Only logged-in users can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-30 bens Open/ClosedOpen Closed
    2019-10-18 bens StatusNone Fixed
    2019-10-18 bens Assigned toNone bens

    Back to the top

    Powered by Savane 3.9