-
Nadav Har'El authored
mkbootfs.py supports wildcard entries, looking like: /jetty/**: ../../../tmp/jetty/** The name of the generated files in the bootfs looked like this: name + relpath + '/' + filename where "name" is "/jetty/", relpath is the directory under it (so for /jetty/foo/bar/yo, relpath is "foo/bar") and filename is the file name (in this example "yo"). The problem is that when relpath=="", i.e., files directly under /jetty, an extra slash was generated - e.g., /jetty//something. When this extra slash was written to the filesystem it confused readdir(), causing it to return twice for each file (once with an empty filename, and a second time with the real filename). This patch avoid the extra slash when relpath is empty.
Nadav Har'El authoredmkbootfs.py supports wildcard entries, looking like: /jetty/**: ../../../tmp/jetty/** The name of the generated files in the bootfs looked like this: name + relpath + '/' + filename where "name" is "/jetty/", relpath is the directory under it (so for /jetty/foo/bar/yo, relpath is "foo/bar") and filename is the file name (in this example "yo"). The problem is that when relpath=="", i.e., files directly under /jetty, an extra slash was generated - e.g., /jetty//something. When this extra slash was written to the filesystem it confused readdir(), causing it to return twice for each file (once with an empty filename, and a second time with the real filename). This patch avoid the extra slash when relpath is empty.