# HG changeset patch # User sergeig # Date 1268244382 0 # Node ID a2b177b28c45e2c460515fe7e35bdd05859f51ab # Parent f89e0743ba67445f917f58e5b966b19c4a930a7e * src/romfs.c: file name comparison was broken for two files with the same stem. A directory/file called "foo" would not be found if there was a file "foo*" before "foo". diff --git a/packages/fs/rom/current/ChangeLog b/packages/fs/rom/current/ChangeLog --- a/packages/fs/rom/current/ChangeLog +++ b/packages/fs/rom/current/ChangeLog @@ -1,3 +1,9 @@ +2010-02-28 Øyvind Harboe + + * src/romfs.c: file name comparison was broken for two files + with the same stem. A directory/file called "foo" would not + be found if there was a file "foo*" before "foo". + 2009-10-09 John Dallaway * cdl/romfs.cdl: Eliminate workarounds for file path handling diff --git a/packages/fs/rom/current/src/romfs.c b/packages/fs/rom/current/src/romfs.c --- a/packages/fs/rom/current/src/romfs.c +++ b/packages/fs/rom/current/src/romfs.c @@ -336,7 +336,7 @@ static bool match( const char *a, const { for ( ; len > 0 && *a && *b && *a == *b ; a++, b++, len-- ) ; - return ( len == 0 ); + return ( len == 0 && *a == 0 ); }