summaryrefslogtreecommitdiff
path: root/ext/POSIX
diff options
context:
space:
mode:
authorPeter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com>2006-11-22 18:41:55 +0100
committerSteve Peters <steve@fisharerojo.org>2006-11-22 17:00:54 +0000
commitb775e6bae012223b0a5cf674d4a41f12f635fb75 (patch)
tree67bcd2ba623c70a4b9be918567afd9219d340801 /ext/POSIX
parent53059177fb9583870694fa5e8162174b9a224ed1 (diff)
downloadperl-b775e6bae012223b0a5cf674d4a41f12f635fb75.tar.gz
POSIX::remove() and directories
From: "Dintelmann, Peter" <Peter.Dintelmann@Dresdner-Bank.com> Message-ID: <3852726AFA94DE4F87E616F13F416A5F0A912F@naimucu1.ffz00k.rootdom.net> p4raw-id: //depot/perl@29353
Diffstat (limited to 'ext/POSIX')
-rw-r--r--ext/POSIX/POSIX.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
index a67f8833ca..617d999828 100644
--- a/ext/POSIX/POSIX.pm
+++ b/ext/POSIX/POSIX.pm
@@ -421,7 +421,7 @@ sub puts {
sub remove {
usage "remove(filename)" if @_ != 1;
- CORE::unlink($_[0]);
+ (-d $_[0]) ? CORE::rmdir($_[0]) : CORE::unlink($_[0]);
}
sub rename {