View Issue Details

IDProjectCategoryView StatusLast Update
0008889GNUnetotherpublic2024-06-03 13:48
Reporterch3 Assigned Toch3  
PrioritylowSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product VersionGit master 
Summary0008889: DISK_glob() not matching * at end
DescriptionGNUNET_DISK_glob() (in file src/lib/util/disk.c) does falsly not match files when the * is the last character in the pattern.

Unfortunately it's quite some while since I discovered it and I'm not 100% sure about the details.

I had a pattern 'test*' and wanted it to match 'test0', 'test1', ... but it matched none of those. (If it matched 'test' I cannot remember.)

It works well for files 'test1.ext', 'test2.ext', ... with the pattern 'test*.ext'.
Steps To ReproduceCreate a file 'test0', ('test1', 'test2', ...) and call GNUNET_DISK_glob() with 'test*'. It should match but does not.
Additional InformationI tried to debug the problem and came to the assumption that 'return false' should be 'return true' in glob_match() disk.c:949.

I did intend to provide a unit test, but was unsure whether gnunet uses these and if yes, how.
TagsNo tags attached.

Activities

ch3

2024-06-03 13:48

developer   ~0022497

Unit test sind gewollt, es gibt viele Beispiele vor allem in utils. Ich schaue mir das 'wie' an und kümmere mich.

Issue History

Date Modified Username Field Change
2024-06-03 12:49 ch3 New Issue
2024-06-03 12:52 ch3 Description Updated
2024-06-03 13:48 ch3 Assigned To => ch3
2024-06-03 13:48 ch3 Status new => assigned
2024-06-03 13:48 ch3 Note Added: 0022497