diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-05 20:42:08 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-05 20:42:08 +0000 |
commit | 27debea5a063352c9aa36622688068206beedff8 (patch) | |
tree | 99f27c28257fa79a3cee94725b2837cb67ad079f /utils | |
parent | ac58d02ceef534ef3a42c8d40ac106f1943f351d (diff) |
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
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/themeeditor/addresourcedir.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/themeeditor/addresourcedir.php b/utils/themeeditor/addresourcedir.php index 3c2ac33f04..cd34433077 100755 --- a/utils/themeeditor/addresourcedir.php +++ b/utils/themeeditor/addresourcedir.php @@ -25,11 +25,10 @@ if($argc < 2) $path = getcwd(); else $path = $argv[1]; -if($path[count($path) - 1] != '/') - $path = $path . '/'; +$path = rtrim($path, "/"); $dir = dir($path); $split = explode("/", $path); -$last = $split[count($split) - 2]; +$last = $split[count($split) - 1]; echo "\t<qresource prefix=\"/$last\">\n"; while(false !== ($entry = $dir->read())) { @@ -37,7 +36,7 @@ while(false !== ($entry = $dir->read())) continue; echo "\t\t"; echo "<file alias = \"$entry\">"; - echo $path . $entry . "</file>"; + echo $path . '/' . $entry . "</file>"; echo "\n"; } echo "\t</qresource>\n"; |