| 52,6 → 52,10 |
| |
| 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"; |
| 67,6 → 71,7 |
| |
| // ZIP it up |
| chdir($tmpname); |
| if (! connection_aborted()) |
| exec("zip -r ".quote("$arcname")." ."); |
| |
| $size = filesize("$arcname.zip"); |
| 73,7 → 78,7 |
| |
| // Give the file to the browser |
| |
| if ($fp = @fopen("$arcname.zip","rb")) |
| if (!connection_aborted() && $fp = @fopen("$arcname.zip","rb")) |
| { |
| header("Content-Type: application/zip"); |
| header("Content-Length: $size"); |