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

 
 

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

Submitted by:  Qianqian Fang <fangq>
Submitted on:  Wed 12 May 2010 04:33:45 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Qianqian FangOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project 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>
Project 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 File(s):
   
   
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
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by fangq (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 May 2010 07:25:55 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Thu 13 May 2010 07:10:42 PM UTCrik5StatusNone=>Patch Submitted
    Wed 12 May 2010 05:56:04 PM UTCfangqAttached File-=>Added tempdir_fix.diff, #20523

    Back to the top


    Powered by Savane 3.1-cleanup1