From e43bfec05f9cc586b8d60cb56e338398546eb90f Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 20 Nov 2011 22:39:59 +0100 Subject: [PATCH] rmdir directories --- lib/CloudStore/Store.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CloudStore/Store.pm b/lib/CloudStore/Store.pm index 2e27727..9ae48ac 100644 --- a/lib/CloudStore/Store.pm +++ b/lib/CloudStore/Store.pm @@ -90,7 +90,7 @@ sub modify_file { my $path = $self->blob_path($data => $from_dir . $1 ); if ( -e $path ) { warn "UNLINK $path"; - unlink $path || warn "ERROR: unlink $path $!"; + -d $path ? rmdir $path : unlink $path || warn "ERROR: unlink $path $!"; next; } else { warn "MISSING $path to unlink"; -- 2.20.1