52,10 → 52,6 |
|
if (count(glob("/tmp/wsvn-*"))<=40) // Omezeni na pocet soucasne stahovanych souboru |
{ |
|
// Ošetření doběhnutí skriptu i když klient klikne jinam (smazání tmp) |
ignore_user_abort(true); |
|
$tmpname1 = tempnam("temp", "wsvn-"); |
$tmpname = $tmpname1; |
$tmpname .= "dir"; |
71,14 → 67,13 |
|
// ZIP it up |
chdir($tmpname); |
if (! connection_aborted()) |
exec("zip -r ".quote("$arcname")." ."); |
exec("zip -r ".quote("$arcname")." ."); |
|
$size = filesize("$arcname.zip"); |
|
// Give the file to the browser |
|
if (!connection_aborted() && $fp = @fopen("$arcname.zip","rb")) |
if ($fp = @fopen("$arcname.zip","rb")) |
{ |
header("Content-Type: application/zip"); |
header("Content-Length: $size"); |