I think that we can use drupals file_directory_temp function.
line 176

-	$tmp_dir = '/tmp';
+	$tmp_dir = file_directory_temp();

line 677

-	$tmp_dir = '/tmp';
+	$tmp_dir = file_directory_temp();

Comments

dmuth’s picture

Status: Needs review » Closed (works as designed)

Sadly, we can't. The reason for this, as I found out in the past, is that if you have the temporary directory underneath htdocs (necessary in some hosting setups), then you have a situation where tar tries to tar a directory that contains itself. It will (properly) throw an error in that case. :-/

-- Doug