summaryrefslogtreecommitdiffstats
path: root/web/html/pkgsubmit.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r--web/html/pkgsubmit.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 793f8ca8..d21e6ae3 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -256,7 +256,7 @@ if ($uid):
}
if (isset($pkg_name)) {
- $incoming_pkgdir = INCOMING_DIR . $pkg_name;
+ $incoming_pkgdir = INCOMING_DIR . substr($pkg_name, 0, 2) . "/" . $pkg_name;
}
if (!$error) {
@@ -268,7 +268,8 @@ if ($uid):
rm_tree($incoming_pkgdir);
}
- if (!@mkdir($incoming_pkgdir)) {
+ # The mode is masked by the current umask, so not as scary as it looks
+ if (!mkdir($incoming_pkgdir, 0777, true)) {
$error = __( "Could not create directory %s.", $incoming_pkgdir);
}
} else {
@@ -286,7 +287,7 @@ if ($uid):
}
if (!$error) {
- if (!@chdir($incoming_pkgdir)) {
+ if (!chdir($incoming_pkgdir)) {
$error = __("Could not change directory to %s.", $incoming_pkgdir);
}