summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-14 03:52:44 +0100
committerDan McGee <dan@archlinux.org>2008-01-20 07:21:20 +0100
commit0eb2997a82b1817124bbfb6986be8058134879ea (patch)
tree867c4f74ddd4bf5bda827506a1c1252147930dc0 /web/html
parent379e16eebda1ba9bfc45de486e99e480843d086a (diff)
downloadaur-0eb2997a82b1817124bbfb6986be8058134879ea.tar.gz
aur-0eb2997a82b1817124bbfb6986be8058134879ea.tar.xz
Allow pkgsubmit to accept any tar* file
Instead of restricting to gz and bz2, allow just plain tar and any other format tar can understand to be uploaded. I make the mistake all the time of forgetting to pass -z to tar when making something to upload, and there is no real reason to exclude plain tar files. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/pkgsubmit.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 801348b1..ccf66c19 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -47,11 +47,9 @@ if ($_COOKIE["AURSID"]) {
$error = __("Could not change directory to %s.",
array(UPLOAD_DIR . $tempdir));
} else {
- exec("/bin/sh -c 'tar xzf " . $_FILES["pfile"]["tmp_name"] . "'", $trash, $retval);
- if ($retval) {
- exec("/bin/sh -c 'tar xjf " . $_FILES["pfile"]["tmp_name"] . "'", $trash, $retval);
- }
- if ($retval) {
+ # try using general tar. it should take .gz, .bz2, and plain .tar
+ exec("/bin/sh -c 'tar xf ".$upload_file."'", $trash, $retval);
+ if (!$retval) {
$error = __("Unknown file format for uploaded file.");
}
}