develooper Front page | perl.perl5.porters | Postings from October 1999

Re: [ID 19991018.001] Perl function "rename oldname, newname" eats network files

Chaim Frenkel
October 29, 1999 10:04
Re: [ID 19991018.001] Perl function "rename oldname, newname" eats network files
Message ID:
If you think about it. It has to be a M$ bug. Why should perl care how many
renames it has done or how many files there are in a directory.

I've recently had to rewrite some ftp code that I had been running. The
file was transfered under a temproary name and then renamed to the final
name. But depending upon the current configuration of stars, a random 
number of files would not show up in the remote machine.

So using that tried and true debuggin mechanism I tried some voodoo
programming and altered the algorithm to avoid the rename. Lo and
behold no complaints in two months.

Isn't voodoo programming fantastic.


>>>>> "DA-" == D'ANDREA Andy -NUCLEAR <> writes:

DA-> This is a bug report for perl from,
DA-> generated with the help of perlbug 1.26 running under perl 5.00503.

DA->  The "rename oldname, newname" function was being used to rename all files
DA->  in a directory that were named in lowercase or a lower/uppercase mix to all
DA->  uppercase.

DA->  The following code stops when the rename fails the first time. This code is
DA->  being run on a networked NT 4 system. The problem occurs when running the
DA->  script on a network directory containing about 20 files having lower case
DA->  character in their names. It doesn't seem to be a problem if working on a
DA->  local hard disk.

DA->  The file being worked on when rename fails is deleted from the filesystem!

DA->  Please let me know if fixed patch exists.

Chaim Frenkel					     Nonlinear Knowledge, Inc.				               +1-718-236-0183 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About