bugGNU Octave - Bugs: bug #50504, dir() function should include a...

 
 

bug #50504: dir() function should include a "folder" entry for each file

Submitted by:  Rik <rik5>
Submitted on:  Thu 09 Mar 2017 08:04:44 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

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)

Sun 12 Mar 2017 07:42:46 PM UTC, comment #6:

I also updated your patch to switch from make_absolute_filename to canonicalize_file_name because in cases where the path was already absolute trailing separators could be left (e.g, "/.././"). Checked in here (http://hg.savannah.gnu.org/hgweb/octave/rev/efb139519388).

Thanks for the catch.

Rik <rik5>
Project Administrator
Sun 12 Mar 2017 02:36:06 PM UTC, comment #5:

"test dir" is failing with the recent addition of the field "folder". Additionally, this field should not contain the trailing file separator for compatibility.
Re-opening for these minor issues. The attached patch should fix both.

(file #39976)

Markus Mützel <mmuetzel>
Project Member
Sat 11 Mar 2017 06:31:16 AM UTC, comment #4:

I added the folder entry in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/44d51b2b691c). Fixed, closing report.

Rik <rik5>
Project Administrator
Fri 10 Mar 2017 07:45:50 PM UTC, comment #3:

Thanks for testing. It's clear that the folder entry needs to be the absolute path name.

Rik <rik5>
Project Administrator
Fri 10 Mar 2017 08:36:29 AM UTC, comment #2:

R2016B on windows: (sine white space deleted from output)

A.R. Burgers <arb>
Thu 09 Mar 2017 08:19:30 PM UTC, comment #1:

To support this I need a little bit more information on how Matlab behaves.

If someone can make the following test set of directories and files and then run the test code I would appreciate it.

Test structure

Test code

I'm interested in whether the folder is just the directory name of the current directory, or whether it is the full absolute path.

Rik <rik5>
Project Administrator
Thu 09 Mar 2017 08:04:44 PM UTC, original submission:

Matlab has added a "folder" entry to the struct returned from the dir command. It should be relatively easy to update Octave to be compatible.

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #39976:  bug50504_dir.patch added by mmuetzel (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mmuetzel (Updated the item)
  • -unavailable- added by arb (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  • -unavailable- added by rik5
  • -unavailable- added by rik5
  •  

    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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 12 Mar 2017 07:42:46 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 12 Mar 2017 02:36:06 PM UTCmmuetzelAttached File-=>Added bug50504_dir.patch, #39976
      StatusFixed=>Patch Submitted
      Open/ClosedClosed=>Open
    Sat 11 Mar 2017 06:31:16 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 09 Mar 2017 08:04:44 PM UTCrik5Carbon-Copy-=>Added larskindermann
      Carbon-Copy-=>Added sebald

    Back to the top


    Powered by Savane 3.1-cleanup1