/WebSVN/dl.php/dl.php
62,22 → 62,23
 
$svnrep->exportDirectory($path, $tmpname.DIRECTORY_SEPARATOR.$arcname, $rev);
echo "*** $arcname ***";
// Create the tar file
chdir($tmpname);
exec($config->tar." -cf ".quote("$arcname.tar")." ".quote($arcname));
//!!!KAKL exec($config->tar." -cf ".quote("$arcname.tar")." ".quote($arcname));
exec("zip -r ".quote("$arcname")." .");
// ZIP it up
exec($config->gzip." ".quote("$arcname.tar"));
$size = filesize("$arcname.tar.gz");
//!!!KAKL exec($config->gzip." ".quote("$arcname.tar"));
//!!!KAKL $size = filesize("$arcname.tar.gz");
$size = filesize("$arcname.zip");
 
// Give the file to the browser
 
if ($fp = @fopen("$arcname.tar.gz","rb"))
if ($fp = @fopen("$arcname.zip","rb"))
{
header("Content-Type: application/x-gzip");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=\"".$rep->name."-$arcname.tar.gz\"");
header("Content-Disposition: attachment; filename=\"".$rep->name."-$arcname.zip\"");
// Use a loop to transfer the data 4KB at a time.
while(!feof($fp))
{
87,7 → 88,7
}
else
{
print "Unable to open file $arcname.tar.gz";
print "Unable to open file $arcname.zip";
}
fclose($fp);