summaryrefslogtreecommitdiff
path: root/modules/update/update.manager.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/update/update.manager.inc')
-rw-r--r--modules/update/update.manager.inc26
1 files changed, 1 insertions, 25 deletions
diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc
index ad8aefdd8..35b292905 100644
--- a/modules/update/update.manager.inc
+++ b/modules/update/update.manager.inc
@@ -731,26 +731,6 @@ function update_manager_install_form_submit($form, &$form_state) {
*/
/**
- * Return the directory where update archive files should be extracted.
- *
- * If the directory does not already exist, attempt to create it.
- *
- * @return
- * The full path to the temporary directory where update file archives
- * should be extracted.
- */
-function _update_manager_extract_directory() {
- $directory = &drupal_static(__FUNCTION__, '');
- if (empty($directory)) {
- $directory = 'temporary://update-extraction';
- if (!file_exists($directory)) {
- mkdir($directory);
- }
- }
- return $directory;
-}
-
-/**
* Unpack a downloaded archive file.
*
* @param string $project
@@ -829,13 +809,9 @@ function update_manager_file_get($url) {
}
// Check the cache and download the file if needed.
- $cache_directory = 'temporary://update-cache';
+ $cache_directory = _update_manager_cache_directory();
$local = $cache_directory . '/' . basename($parsed_url['path']);
- if (!file_exists($cache_directory)) {
- mkdir($cache_directory);
- }
-
if (!file_exists($local) || update_delete_file_if_stale($local)) {
return system_retrieve_file($url, $local, FALSE, FILE_EXISTS_REPLACE);
}