summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc4
-rw-r--r--modules/system/system.module2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index fead5c2fc..9ef4fcf45 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -338,7 +338,7 @@ function system_theme_settings(&$form_state, $key = '') {
// The image was saved using file_save_upload() and was added to the
// files table as a temporary file. We'll make a copy and let the garbage
// collector delete the original upload.
- if ($filepath = file_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
+ if ($filepath = file_unmanaged_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
$_POST['default_logo'] = 0;
$_POST['logo_path'] = $filepath;
$_POST['toggle_logo'] = 1;
@@ -353,7 +353,7 @@ function system_theme_settings(&$form_state, $key = '') {
// The image was saved using file_save_upload() and was added to the
// files table as a temporary file. We'll make a copy and let the garbage
// collector delete the original upload.
- if ($filepath = file_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
+ if ($filepath = file_unmanaged_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
$_POST['default_favicon'] = 0;
$_POST['favicon_path'] = $filepath;
$_POST['toggle_favicon'] = 1;
diff --git a/modules/system/system.module b/modules/system/system.module
index e4d9abea0..8f533b20f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1405,7 +1405,7 @@ function system_cron() {
if (file_exists($file->filepath)) {
// If files that exist cannot be deleted, continue so the database remains
// consistent.
- if (!file_delete($file->filepath)) {
+ if (!file_delete($file)) {
watchdog('file system', 'Could not delete temporary file "%path" during garbage collection', array('%path' => $file->filepath), WATCHDOG_ERROR);
continue;
}