Front page | perl.perl5.porters |
Postings from March 2000
a bug in File::Path ver: 1.0401
From:
Stas Bekman
Date:
March 6, 2000 01:17
Subject:
a bug in File::Path ver: 1.0401
Message ID:
Pine.A41.3.96.1000304185702.18830H-100000@ilx374.iil.intel.com
Hi Tim and Charles
I've found a bug in the module File::Path ver: 1.0401.
The documentations says that: "Symlinks are treated as ordinary files".
Aparrently they aren't since rmtree() cannot handle directories that
include symlinks.
This little snippet represents the problem:
test.pl
----
use File::Path;
File::Path::mkpath("foo",0,0777);
system "ln", "-s", "foo/foo1", "foo/foo2";
File::Path::rmtree("foo",0,1);
$ perl -w test.pl
Can't remove directory foo: Directory not empty at test.pl line 4
Result: The tree is not completely deleted.
Relevant system specs:
$ uname -a
Linux stas 2.2.12-20 #1 Mon Sep 27 10:25:54 EDT 1999 i586 unknown
$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=linux, osvers=2.2.5-22smp, archname=i386-linux
uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2
09:11:51 edt 1999 i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under linux
Compiled at Aug 30 1999 23:09:51
@INC:
/usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005
.
Thank you!
______________________________________________________________________
Stas Bekman | JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ | mod_perl Guide http://perl.apache.org/guide/
mailto:stas@stason.org | http://perl.org http://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
----------------------------------------------------------------------
-
a bug in File::Path ver: 1.0401
by Stas Bekman