summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/themeeditor/addresourcedir.php7
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();
26else 26else
27 $path = $argv[1]; 27 $path = $argv[1];
28if($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];
33echo "\t<qresource prefix=\"/$last\">\n"; 32echo "\t<qresource prefix=\"/$last\">\n";
34while(false !== ($entry = $dir->read())) 33while(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}
43echo "\t</qresource>\n"; 42echo "\t</qresource>\n";