bugGNU Octave - Bugs: bug #39357, "dir" function return...


bug #39357: "dir" function return empty names

Submitted by:  None
Submitted on:  Fri Jun 28 13:53:00 2013  
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Georg StillfriedOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich 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)

Wed Jul 24 15:11:29 2013, comment #7:

Good to see it had an answer. Closing report.

Rik <rik5>
Project Administrator
Wed Jul 24 10:00:31 2013, comment #6:

Ah, now I found the cause of the problem. It is not a bug in Octave.

I have an own function called index.m which overloads Octave's index.m, but does something different.

After renaming my function it worked fine.

Thanks again for your help!

Wed Jul 24 09:44:34 2013, comment #5:

Thank you very much for your answers.

I tried what you suggested and it seems that the problem is in the fileparts function:


Wed Jul 24 09:43:16 2013, comment #4:

Thank you very much for your answers.

I tried what you suggested and it seems that the problem is in the fileparts function:

Wed Jul 17 21:52:33 2013, comment #3:

Since we can't reproduce it I think you might need to try on your own. The 'dir' function is an m-file which means it is written in Octave's own scripting language and you can step through the code line-by-line with the debugger until you notice something odd.

Try the following

You can just hit <RETURN> to keep executing dbnext and advance line by line.

Rik <rik5>
Project Administrator
Tue Jul 2 13:26:34 2013, comment #2:

Yes, that is all zeros.

Fri Jun 28 14:37:25 2013, comment #1:

Can't reproduce.

Can you please confirm that you really are getting empty strings there instead of some display issue?

What does the following do?

Is that all zeros?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Fri Jun 28 13:53:00 2013, original submission:

The "dir" function is supposed to list the files within a directory. It seems to find the files, and to properly store the other attributes like date into a variable. However, the stored or displayed names are empty.

octave:82> ls
octave:83> dir

octave:84> a = dir
a =

3x1 struct array containing the fields:


octave:85> a.name
ans =
ans =
ans =
octave:86> a.date
ans = 28-Jun-2013 11:55:09
ans = 28-Jun-2013 11:54:54
ans = 28-Jun-2013 12:08:07



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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by None (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Jul 24 15:11:29 2013rik5StatusWorks For Me=>Invalid
    Fri Jun 28 14:37:25 2013jordighStatusNone=>Works For Me

    Back to the top

    Powered by Savane 3.1-cleanup1