changeset 2941:a2b177b28c45

* 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".
author sergeig
date Wed, 10 Mar 2010 18:06:22 +0000
parents f89e0743ba67
children 00f713b93ea4
files packages/fs/rom/current/ChangeLog packages/fs/rom/current/src/romfs.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/fs/rom/current/ChangeLog
+++ b/packages/fs/rom/current/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-28  √ėyvind Harboe  <oyvind.harboe@zylin.com>
+
+	* 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  <john@dallaway.org.uk>
 
 	* cdl/romfs.cdl: Eliminate workarounds for file path handling
--- 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 );
 }