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/themeeditor | |
parent | ac58d02ceef534ef3a42c8d40ac106f1943f351d (diff) | |
download | rockbox-27debea5a063352c9aa36622688068206beedff8.tar.gz rockbox-27debea5a063352c9aa36622688068206beedff8.zip |
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/themeeditor')
-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) | |||
25 | $path = getcwd(); | 25 | $path = getcwd(); |
26 | else | 26 | else |
27 | $path = $argv[1]; | 27 | $path = $argv[1]; |
28 | if($path[count($path) - 1] != '/') | 28 | $path = rtrim($path, "/"); |
29 | $path = $path . '/'; | ||
30 | $dir = dir($path); | 29 | $dir = dir($path); |
31 | $split = explode("/", $path); | 30 | $split = explode("/", $path); |
32 | $last = $split[count($split) - 2]; | 31 | $last = $split[count($split) - 1]; |
33 | echo "\t<qresource prefix=\"/$last\">\n"; | 32 | echo "\t<qresource prefix=\"/$last\">\n"; |
34 | while(false !== ($entry = $dir->read())) | 33 | while(false !== ($entry = $dir->read())) |
35 | { | 34 | { |
@@ -37,7 +36,7 @@ while(false !== ($entry = $dir->read())) | |||
37 | continue; | 36 | continue; |
38 | echo "\t\t"; | 37 | echo "\t\t"; |
39 | echo "<file alias = \"$entry\">"; | 38 | echo "<file alias = \"$entry\">"; |
40 | echo $path . $entry . "</file>"; | 39 | echo $path . '/' . $entry . "</file>"; |
41 | echo "\n"; | 40 | echo "\n"; |
42 | } | 41 | } |
43 | echo "\t</qresource>\n"; | 42 | echo "\t</qresource>\n"; |