bugGNU Octave - Bugs: bug #29864, considering adding an trailing...

 
 

bug #29864: considering adding an trailing filesep in tempdir output

Submitter:  Qianqian Fang <fangq>
Submitted:  Wed 12 May 2010 04:33:45 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Qianqian Fang Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 13 May 2010 07:25:55 PM UTC, comment #6: 

Thanks for the patch.  It has been applied in the following changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/10df75a24242

Rik <rik5>
Group administrator
Wed 12 May 2010 05:56:04 PM UTC, comment #5: 

sorry about that.

For octave, this seems to be implemented, but incorrectly. Attached is a fix.

(file #20523)

Qianqian Fang <fangq>
Wed 12 May 2010 05:08:03 PM UTC, comment #4: 

Please, you MUST NOT look at Matlab sources to determine how Octave should be implemented.

John W. Eaton <jwe>
Group administrator
Wed 12 May 2010 03:13:32 PM UTC, comment #3: 

from tempdir.m for matlab 7.4, I can see
    if (tmp_dir(length(tmp_dir)) ~= filesep)
        tmp_dir = [tmp_dir filesep];
    end
in the code, so this behavior should be deterministic.

Qianqian Fang <fangq>
Wed 12 May 2010 03:11:15 PM UTC, comment #2: 

I ran matlab from 6.0.0.88 (R12) all the way to 7.8.0.347 (R2009a) from our center resources, tempdir always returns with a trailing filesep. The computers used are CentOS 5.3 and Ubuntu 9.10.

Qianqian Fang <fangq>
Wed 12 May 2010 02:31:59 PM UTC, comment #1: 

Matlab, apparently, also isn't clear whether a file seperator should be added or not.  According to this documentation (http://www.mathworks.com/access/helpdesk/help/techdoc/import_export/f5-5983.html) tempdir returns just '/tmp' on UNIX systems.

What version of Matlab are you running and what platform is it running on?

Anonymous
Wed 12 May 2010 04:33:45 AM UTC, original submission:  

In matlab, tempdir has a trailing filesep, while it doesn't in octave. If either way is ok, it would be really nice to match matlab's format.

Qianqian Fang <fangq>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #20523:  tempdir_fix.diff added by fangq (374B - text/x-patch - patch to return tempdir with trailing filesep)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by fangq (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-13 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2010-05-13 rik5 StatusNone Patch Submitted
    2010-05-12 fangq Attached File- Added tempdir_fix.diff, #20523

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code