12 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
13 |
use Carp qw/confess/; |
use Carp qw/confess/; |
14 |
use IO::File; |
use IO::File; |
15 |
|
use Getopt::Long; |
16 |
|
|
17 |
|
my $debug = 0; |
18 |
|
my $fuse_debug = 0; |
19 |
|
|
20 |
|
GetOptions( |
21 |
|
'debug+' => \$debug, |
22 |
|
'fuse-debug+' => \$fuse_debug, |
23 |
|
); |
24 |
|
|
25 |
my $mount = { |
my $mount = { |
26 |
from => '/tmp/comp', |
from => '/tmp/comp', |
168 |
my $dest_path = $tmp; |
my $dest_path = $tmp; |
169 |
$dest_path =~ s!/[^/]+$!!; #!vim-fix |
$dest_path =~ s!/[^/]+$!!; #!vim-fix |
170 |
mkpath $dest_path unless -e $dest_path; |
mkpath $dest_path unless -e $dest_path; |
171 |
file_copy( '<:gzip', $path, '>', $tmp ); |
if ( -s $path ) { |
172 |
|
file_copy( '<:gzip', $path, '>', $tmp ) |
173 |
|
} else { |
174 |
|
warn "ERROR: filesystem corruption, $path is zero size\n"; |
175 |
|
} |
176 |
$path = $tmp; |
$path = $tmp; |
177 |
} |
} |
178 |
|
|
256 |
my $path = $pending->{$old}->{path}; |
my $path = $pending->{$old}->{path}; |
257 |
$path =~ s/\Q$old\E/$new/; |
$path =~ s/\Q$old\E/$new/; |
258 |
$pending->{$new}->{path} = $path; |
$pending->{$new}->{path} = $path; |
259 |
|
$pending->{$old}->{path} = $path; |
260 |
|
|
261 |
delete( $pending->{$old} ); |
#delete( $pending->{$old} ); |
262 |
} |
} |
263 |
|
|
264 |
return $err; |
return $err; |
388 |
statfs =>"main::x_statfs", |
statfs =>"main::x_statfs", |
389 |
release =>"main::x_release", |
release =>"main::x_release", |
390 |
# threaded=>1, |
# threaded=>1, |
391 |
# debug => 1, |
debug => $fuse_debug, |
392 |
); |
); |