archive handler can use the system temp dir
git-svn-id: file:///home/shish/svn/shimmie2/trunk@770 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
129c8f0d69
commit
f0ab3ee7a5
@ -9,7 +9,6 @@ class ArchiveFileHandler extends Extension {
|
|||||||
public function receive_event($event) {
|
public function receive_event($event) {
|
||||||
if(is_a($event, 'InitExtEvent')) {
|
if(is_a($event, 'InitExtEvent')) {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_default_string('archive_tmp_dir', "/tmp");
|
|
||||||
$config->set_default_string('archive_extract_command', 'unzip -d "%d" "%f"');
|
$config->set_default_string('archive_extract_command', 'unzip -d "%d" "%f"');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,7 +22,7 @@ class ArchiveFileHandler extends Extension {
|
|||||||
|
|
||||||
if(is_a($event, 'DataUploadEvent') && $this->supported_ext($event->type)) {
|
if(is_a($event, 'DataUploadEvent') && $this->supported_ext($event->type)) {
|
||||||
global $config;
|
global $config;
|
||||||
$tmp = $config->get_string('archive_tmp_dir');
|
$tmp = sys_get_temp_dir();
|
||||||
$tmpdir = "$tmp/shimmie-archive-{$event->hash}";
|
$tmpdir = "$tmp/shimmie-archive-{$event->hash}";
|
||||||
$cmd = $config->get_string('archive_extract_command');
|
$cmd = $config->get_string('archive_extract_command');
|
||||||
$cmd = str_replace('%f', $event->tmpfile);
|
$cmd = str_replace('%f', $event->tmpfile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user