# NOTE: Derived from blib/lib/Inline.pm.
# Changes made here will be lost when autosplit is run again.
#line 1182 "blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/rmpath.al)"
#==============================================================================
#==============================================================================
my ($o, $prefix, $rmpath) = @_;
# Nuke the target directory
_rmtree(File::Spec->catdir($prefix ? ($prefix,$rmpath) : ($rmpath)));
# Remove any empty directories underneath the requested one
my @parts = File::Spec->splitdir($rmpath);
$rmpath = File::Spec->catdir($prefix ? ($prefix,@parts) : @parts);
or last; # rmdir failed because dir was not empty