From: Dirk Koopman Date: Sat, 16 Feb 2019 17:00:59 +0000 (+0000) Subject: revert export_users to in process action X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=fabf556875ff78823220ef70051640b2639f731b;p=spider.git revert export_users to in process action This potentially does deletes which is a problem (at least for now) on spawned commands --- diff --git a/cmd/export_users.pl b/cmd/export_users.pl index 5555512e..774d8384 100644 --- a/cmd/export_users.pl +++ b/cmd/export_users.pl @@ -8,9 +8,14 @@ my $line = shift;; return (1, $self->msg('e5')) unless $self->priv >= 9; my ($fn, $flag) = split /\s+/, $line; +$fn ||= 'user_asc'; +unless ($fn && $fn eq 'user_asc') { + $fn =~ s|[/\.]||g; + $fn = "/tmp/$fn"; +} my $strip = $flag eq 'strip'; -my @out = $self->spawn_cmd("export_users", \&DXUser::export, args => [$fn, $strip]); +my @out = DXUser::export($fn, $strip); return (1, @out);