projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8576e8a
)
freeside-cdr-sftp_and_import: add an option to gunzip imported files, RT10991
author
levinse
<levinse>
Wed, 22 Jun 2011 18:22:05 +0000
(18:22 +0000)
committer
levinse
<levinse>
Wed, 22 Jun 2011 18:22:05 +0000
(18:22 +0000)
FS/bin/freeside-cdr-sftp_and_import
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-cdr-sftp_and_import
b/FS/bin/freeside-cdr-sftp_and_import
index
e09f7dc
..
ab9d4a6
100755
(executable)
--- a/
FS/bin/freeside-cdr-sftp_and_import
+++ b/
FS/bin/freeside-cdr-sftp_and_import
@@
-96,7
+96,13
@@
foreach my $filename ( @$ls ) {
my $ungziped = $filename;
my $ungziped =~ s/\.gz$//;
- system("gunzip $cachedir/$filename") if $opt_g;
+ if ( $opt_g ) {
+ if(system('gunzip', "$cachedir/$filename") != 0) {
+ warn "gunzip of '$cachedir/$filename' failed" if $opt_v;
+ unlink "$cachedir/$filename";
+ next;
+ }
+ }
my $import_options = {
'file' => "$cachedir/$ungziped",