summaryrefslogtreecommitdiffstats
path: root/lib.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-05 15:07:29 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-05 15:07:29 +0000
commit4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7 (patch)
tree6a37b89a3b2b1a5a3be49fd4be8cf142d110a137 /lib.php
parentb6c6c47fd28fb82cc3fdc12fc11e7fc8bf0ed651 (diff)
downloadpkgsubmit-4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7.tar
pkgsubmit-4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7.tar.gz
pkgsubmit-4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7.tar.bz2
pkgsubmit-4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7.tar.xz
pkgsubmit-4f4061ca4e3cb4eed76b6ecfcb6d3a0a2d609bb7.zip
restore CWD when leaving the function
Diffstat (limited to 'lib.php')
-rw-r--r--lib.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib.php b/lib.php
index 2fec295..94186a7 100644
--- a/lib.php
+++ b/lib.php
@@ -28,6 +28,7 @@
*/
function get_submitted_packages($upload_dir, $max_modified)
{
+ $cwd = getcwd();
chdir($upload_dir);
$matches = array();
@@ -38,6 +39,8 @@ function get_submitted_packages($upload_dir, $max_modified)
$matches,
PREG_SET_ORDER);
+ chdir($cwd);
+
return $matches;
}