diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-13 22:59:47 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-13 23:02:42 +0200 |
commit | b9bdad51658a81e044957d3c327aa3ff1cbad408 (patch) | |
tree | 0d19625f9458f4b0b7e3766693311090a44178c1 /lib/files.php | |
parent | b9f9228a22944184803a8835282862e468812c1d (diff) | |
download | nextcloud-server-b9bdad51658a81e044957d3c327aa3ff1cbad408.tar.gz nextcloud-server-b9bdad51658a81e044957d3c327aa3ff1cbad408.zip |
make sure temporary files are being removed, fixes oc-450
Diffstat (limited to 'lib/files.php')
-rw-r--r-- | lib/files.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/files.php b/lib/files.php index 051cfd4b81c..01558a68588 100644 --- a/lib/files.php +++ b/lib/files.php @@ -63,7 +63,7 @@ class OC_Files { $executionTime = intval(ini_get('max_execution_time')); set_time_limit(0); $zip = new ZipArchive(); - $filename = get_temp_dir().'/ownCloud_'.mt_rand(10000,99999).'.zip'; + $filename = OC_Helper::tmpFile('.zip'); if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==TRUE) { exit("cannot open <$filename>\n"); } @@ -84,7 +84,7 @@ class OC_Files { $executionTime = intval(ini_get('max_execution_time')); set_time_limit(0); $zip = new ZipArchive(); - $filename = get_temp_dir().'/ownCloud_'.mt_rand(10000,99999).'.zip'; + $filename = OC_Helper::tmpFile('.zip'); if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==TRUE) { exit("cannot open <$filename>\n"); } |