From 4dc7ed139bdc809d468d4d055a86221c8e3b6dd0 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 30 May 2012 14:18:47 +0200 Subject: donĀ“t hardcode /tmp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/helper.php | 2 +- lib/migrate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/helper.php b/lib/helper.php index 31819d2e3fc..6a2b3a6897b 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -514,7 +514,7 @@ class OC_Helper { * remove all files created by self::tmpFile */ public static function cleanTmp(){ - $leftoversFile='/tmp/oc-not-deleted'; + $leftoversFile=get_temp_dir().'/oc-not-deleted'; if(file_exists($leftoversFile)){ $leftovers=file($leftoversFile); foreach($leftovers as $file) { diff --git a/lib/migrate.php b/lib/migrate.php index 8fb949d66e1..f9cab915d04 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -146,7 +146,7 @@ class OC_Migrate{ case 'instance': self::$content = new OC_Migration_Content( self::$zip ); // Creates a zip that is compatable with the import function - $dbfile = tempnam( "/tmp", "owncloud_export_data_" ); + $dbfile = tempnam( get_temp_dir(), "owncloud_export_data_" ); OC_DB::getDbStructure( $dbfile, 'MDB2_SCHEMA_DUMP_ALL'); // Now add in *dbname* and *dbprefix* -- cgit v1.2.3