From f56a075f3650d034e7fd2fead29b3c31d7ed340a Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 14 May 2013 16:01:57 +0200 Subject: [PATCH] Create directories vio mkcol and do not compare dir sizes. --- tests/ownCloud/t1.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/ownCloud/t1.pl b/tests/ownCloud/t1.pl index e20e0aacd7..98d9237381 100755 --- a/tests/ownCloud/t1.pl +++ b/tests/ownCloud/t1.pl @@ -133,7 +133,7 @@ sub assertLocalDirs( $$ ) opendir(my $dh, $dir1 ) || die; while(readdir $dh) { assert( -e "$dir2/$_" ); - + next if( -d "$dir1/$_"); # don't compare directory sizes. my $s1 = -s "$dir1/$_"; my $s2 = -s "$dir2/$_"; assert( $s1 == $s2 ); @@ -260,11 +260,16 @@ sub glob_put( $$$ ) if( $lfile =~ /.*\/(.+)$/g ) { my $rfile = $1; my $puturl = "$target"."$rfile"; - print " *** Putting $lfile to $puturl\n"; - if( ! $d->put( -local=>$lfile, -url=> $puturl ) ) { - print " ### FAILED to put: ". $d->message . '\n'; + if( -d $lfile ) { + $d->mkcol( $puturl ); + } else { + print " *** Putting $lfile to $puturl\n"; + if( ! $d->put( -local=>$lfile, -url=> $puturl ) ) { + print " ### FAILED to put: ". $d->message . '\n'; + } } } + } }