bugGNU Octave - Bugs: bug #40488, 'edit' may overwrite (package)...

 
 

bug #40488: 'edit' may overwrite (package) functions when called with full path

Submitter:  Markus Appel <mappel>
Submitted:  Wed 06 Nov 2013 10:20:33 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 16 Nov 2013 04:51:11 PM UTC, comment #1: 

I can confirm this bug in Octave 3.6.4 but testing with version 3.7.7+ (I don't remember the cset used to build it but was a few days ago) it's already fixed.

Carnë Draug <carandraug>
Group Member
Wed 06 Nov 2013 10:20:33 AM UTC, original submission:  

I guess 'edit' was not meant to be called with a full path, but I was curious and wanted to have a look into the private function 'chunk_parcellfun.m' of the general package. As it is not found by edit because it's private, I wanted to take a shortcut by typing


edit ~/octave/general-1.3.2/private/chunk_parcellfun.m


into my octave terminal session where my edit configuration is


edit get all
ans =

  scalar structure containing the fields:

    EDITOR = gedit -b %s
    HOME = /home/mappel/octave
    AUTHOR = Markus Appel
    EMAIL = <mappel@epkm120>
    LICENSE = GPL
    MODE = async
    EDITINPLACE = 0


I ended up with gedit editing a completely empty new file named 'chunk_parcellfun.m' in a path '[current_path]/~/octave/general-1.3.2/private'. When I looked at the original file ~/octave/general-1.3.2/private/chunk_parcellfun.m I found it overwritten by an empty function called '~/octave/general-1.3.2/private/chunk_parcellfun' with my copyright info on top. Btw, the same happens if I try to edit not private package functions with full path.

Maybe edit should be more careful when given a full path (which may include tilde)?

Markus Appel <mappel>

 

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

Attach Files:
   
   
Comment:
   

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 mappel (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 group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-16 carandraug StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code