}
sub mkbasepath {
- my ($path,$opts) = @_;
+ my ($self,$path,$opts) = @_;
$path =~ s{/[^/]+$}{};
make_path $path unless -d $path;
}
my $f_full = "$f->{dir}/$f_path";
my $t_full = "$t->{dir}/$t_path";
- mkbasepath $t_full, { uid => $t->{uid} };
+ $self->mkbasepath( $t_full, { uid => $t->{uid} } );
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat $f_full;
if ( $uid == $f->{uid} ) {
file => "test/store",
itemize => ">f+++++++++",
login => "u2001",
- md5 => "51ce99ec40129bfe1fd11d65b346d15e",
+ md5 => "d8e8fca2dc0f896fd7cb4cb0031ba249",
mtime => "2011-07-17T17:55:15",
op => "recv",
perms => "rw-r--r--",
ok $r->init_pid_login( $data->{pid}, $data->{login} ), 'init_pid_login';
ok my $full_path = $r->blob_path( $data ), 'blob_path';
+diag $full_path;
if ( ! -e $full_path ) {
- $r->
- open(my $fh, '>', $full_path);
- print $fh "test\n";
+ $r->{api}->mkbasepath( $full_path, { uid => $u->{uid} } );
+ open(my $fh, '>', $full_path) || die $!;
+ print $fh "test\n" || die $!;
close $fh;
diag "$full_path created";
}