bugGNU Octave - Bugs: bug #46293, Glob does not do all the list of...

 
 

bug #46293: Glob does not do all the list of file names.

Submitter:  Doug Stewart <dastew>
Submitted:  Sun 25 Oct 2015 05:27:34 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Duplicate Assigned to:  None
Originator Name:  Doug Stewart Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 25 Oct 2015 07:26:47 PM UTC, comment #2: 

This is a duplicate of bug #46216

Philip Nienhuis <philipnienhuis>
Group Member
Sun 25 Oct 2015 06:45:53 PM UTC, comment #1: 

one more example
cc =
{
  [1,1] = lsss.txt
  [1,2] = Makefile
  [1,3] = /home/doug/Desktop/src/mpfr_commons.cc
  [1,4] = /home/doug/Desktop/src/mpfr_function_d.cc
  [1,5] = /home/doug/Desktop/src/mpfr_function_d.oct
  [1,6] = /home/doug/Desktop/src/mpfr_matrix_mul_d.oct
  [1,7] = /home/doug/Desktop/src/mpfr_linspace_d.oct
}
dd =
{
  [1,1] = /home/doug/Desktop/src/mpfr_matrix_mul_d.oct
}

Doug Stewart <dastew>
Sun 25 Oct 2015 05:27:34 PM UTC, original submission:  

Glob only returns the longest filename.

In the following example all the file names that I am using are actual files in that folder.





a={ "lsss.txt", ...
"Makefile", ...
"/home/doug/Desktop/src/mpfr_commons.cc",...
"/home/doug/Desktop/src/mpfr_function_d.cc",...
"/home/doug/Desktop/src/mpfr_function_d.oct",...
"/home/doug/Desktop/src/mpfr_linspace_d.oct",...
}

b=glob(a)

c={ "lsss.txt", ...
"Makefile", ...
"/home/doug/Desktop/src/mpfr_commons.cc",...
"/home/doug/Desktop/src/mpfr_function_d.cc",...
"/home/doug/Desktop/src/mpfr_function_d.oct",...
"/home/doug/Desktop/src/mpfr_linspace_d.oct",...
"/home/doug/Desktop/src/mpfr_matrix_mul_d.oct*"...
}

d=glob(c)


ee={ "lsss.txt", ...
"Makefile", ...
"/home/doug/Desktop/src/mpfr_commons.cc",...
"/home/doug/Desktop/src/mpfr_function_d.cc",...
"/home/doug/Desktop/src/mpfr_function_d.oct",...
"/home/doug/Desktop/src/mpfr_linspace_d.oct",...
"/home/doug/Desktop/src/mpfr_matrix_mul_d.*"...
}

f=glob(ee)



and now for the results:


a =
{
  [1,1] = lsss.txt
  [1,2] = Makefile
  [1,3] = /home/doug/Desktop/src/mpfr_commons.cc
  [1,4] = /home/doug/Desktop/src/mpfr_function_d.cc
  [1,5] = /home/doug/Desktop/src/mpfr_function_d.oct
  [1,6] = /home/doug/Desktop/src/mpfr_linspace_d.oct
}
b =
{
  [1,1] = /home/doug/Desktop/src/mpfr_function_d.oct
  [2,1] = /home/doug/Desktop/src/mpfr_linspace_d.oct
}
c =
{
  [1,1] = lsss.txt
  [1,2] = Makefile
  [1,3] = /home/doug/Desktop/src/mpfr_commons.cc
  [1,4] = /home/doug/Desktop/src/mpfr_function_d.cc
  [1,5] = /home/doug/Desktop/src/mpfr_function_d.oct
  [1,6] = /home/doug/Desktop/src/mpfr_linspace_d.oct
  [1,7] = /home/doug/Desktop/src/mpfr_matrix_mul_d.oct*
}
d =
{
  [1,1] = /home/doug/Desktop/src/mpfr_matrix_mul_d.oct
}
ee =
{
  [1,1] = lsss.txt
  [1,2] = Makefile
  [1,3] = /home/doug/Desktop/src/mpfr_commons.cc
  [1,4] = /home/doug/Desktop/src/mpfr_function_d.cc
  [1,5] = /home/doug/Desktop/src/mpfr_function_d.oct
  [1,6] = /home/doug/Desktop/src/mpfr_linspace_d.oct
  [1,7] = /home/doug/Desktop/src/mpfr_matrix_mul_d.*
}
f =
{
  [1,1] = /home/doug/Desktop/src/mpfr_function_d.oct
  [2,1] = /home/doug/Desktop/src/mpfr_linspace_d.oct
  [3,1] = /home/doug/Desktop/src/mpfr_matrix_mul_d.cc
  [4,1] = /home/doug/Desktop/src/mpfr_matrix_mul_d.o
  [5,1] = /home/doug/Desktop/src/mpfr_matrix_mul_d.oct
}
>>


you can see that b is the longest 2 file names of a
and d is the longest file name of c
and f is the result of the wildcard "*" plus the 2 next shorter file names.

I hope this will help the c++ debugers find the problem.

Doug Stewart <dastew>

 

(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 dastew (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
    2015-10-25 philipnienhuis StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code