projects
/
bizou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d213139
)
Some cleanup in tar.php
author
Marc MAURICE
<dooblempub@positon.org>
Mon, 13 Jun 2011 14:01:12 +0000
(16:01 +0200)
committer
Marc MAURICE
<dooblempub@positon.org>
Mon, 13 Jun 2011 14:01:12 +0000
(16:01 +0200)
plugins/tar/tar.php
patch
|
blob
|
history
diff --git
a/plugins/tar/tar.php
b/plugins/tar/tar.php
index
9395e41
..
add078d
100644
(file)
--- a/
plugins/tar/tar.php
+++ b/
plugins/tar/tar.php
@@
-27,15
+27,6
@@
$out = exec("tar --no-recursion --totals -cf /dev/null $filesarg 2>&1");
preg_match('/^Total bytes written: ([0-9]+) /', $out, $matches);
$totalsize = $matches[1];
preg_match('/^Total bytes written: ([0-9]+) /', $out, $matches);
$totalsize = $matches[1];
-#$out = exec("du -c $filesarg");
-#preg_match('/^([0-9]+).*total$/', $out, $matches);
-#$totalsize = $matches[1] * 1024;
-
-#var_dump($totalsize);
-
-#var_dump("tar --no-recursion -c $filesarg");
-#die();
-
header("Content-Length: $totalsize");
header('Content-Type: application/x-tar');
header('Content-Disposition: attachment; filename="'.basename($realDir).'.tar"');
header("Content-Length: $totalsize");
header('Content-Type: application/x-tar');
header('Content-Disposition: attachment; filename="'.basename($realDir).'.tar"');