diff options
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r-- | web/html/pkgsubmit.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index d7026b7..1e5a134 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -37,11 +37,15 @@ if ($_COOKIE["AURSID"]) { $error = __("Could not change directory to %s.", array(UPLOAD_DIR . $tempdir)); } else { - # try using general tar. it should take .gz, .bz2, and plain .tar - exec("/bin/sh -c 'tar xf ".$_FILES['pfile']['tmp_name']."'", $trash, $retval); - if ($retval) { - $error = __("Unknown file format for uploaded file."); - } + if ($_FILES['pfile']['name'] == "PKGBUILD") { + move_uploaded_file($_FILES['pfile']['tmp_name'], UPLOAD_DIR . $tempdir . "/PKGBUILD"); + } else { + # try using general tar. it should take .gz, .bz2, and plain .tar + exec("/bin/sh -c 'tar xf ".$_FILES['pfile']['tmp_name']."'", $trash, $retval); + if ($retval) { + $error = __("Unknown file format for uploaded file."); + } + } } } } |