use strict;
use autodie;
+use CloudStore::JSON;
+use Data::Dump qw(dump);
+
sub path_md5 {
my ( $path, $md5 ) = @_;
sub path_remove {
my ( $path ) = @_;
- my ( undef, undef, undef, $nlink ) = stat $path;
+ my $deleted = CloudStore::JSON::file_data( $path );
+
+ my ( undef, undef, undef, $nlink ) = stat "md5/$deleted->{md5}";
+
+ warn "path_remove $path $nlink ",dump $deleted;
- warn "nlink $path $nlink";
}
my $empty_md5 = " " x 32;