Theme Editor: Fixed redundant directory separator bug in addresourcedir script

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27299 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-07-05 20:42:08 +00:00
parent ac58d02cee
commit 27debea5a0

View file

@ -25,11 +25,10 @@ if($argc < 2)
$path = getcwd(); $path = getcwd();
else else
$path = $argv[1]; $path = $argv[1];
if($path[count($path) - 1] != '/') $path = rtrim($path, "/");
$path = $path . '/';
$dir = dir($path); $dir = dir($path);
$split = explode("/", $path); $split = explode("/", $path);
$last = $split[count($split) - 2]; $last = $split[count($split) - 1];
echo "\t<qresource prefix=\"/$last\">\n"; echo "\t<qresource prefix=\"/$last\">\n";
while(false !== ($entry = $dir->read())) while(false !== ($entry = $dir->read()))
{ {
@ -37,7 +36,7 @@ while(false !== ($entry = $dir->read()))
continue; continue;
echo "\t\t"; echo "\t\t";
echo "<file alias = \"$entry\">"; echo "<file alias = \"$entry\">";
echo $path . $entry . "</file>"; echo $path . '/' . $entry . "</file>";
echo "\n"; echo "\n";
} }
echo "\t</qresource>\n"; echo "\t</qresource>\n";