[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

RE: [ID 20000114.001] Perl rename function can delete files



Original tracking record and reply is as follows:
Re: [ID 19991018.001] Perl function     "rename oldname, newname" eats
network files

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.
<chaim>
	>>>>> "DA-" == D'ANDREA Andy -NUCLEAR
<andy.d.andrea@ontariopowergeneration.com
<mailto:andy.d.andrea@ontariopowergeneration.com> > writes:

DA-> This is a bug report for perl from
andy.d.andrea@ontariopowergeneration.com
<mailto:andy.d.andrea@ontariopowergeneration.com> , 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.
chaimf@pobox.com <mailto:chaimf@pobox.com>
+1-718-236-0183

	----------
	From:  Moss, Jeff [SMTP:jmoss@huffmancorp.com]
	Sent:  Tuesday, January 18, 2000 11:40 AM
	To:  D'ANDREA Andy -NUCLEAR
	Subject:  FW: [ID 20000114.001] Perl rename function can delete
files

	Could you please reply to this message and give them your
	original tracking number.

	                     Jeff Moss

	-----Original Message-----
	From: Dominic Dunlop [mailto:domo@computer.org] 
	Sent: Tuesday, January 18, 2000 5:17 AM
	To: Moss, Jeff
	Cc: perl5-porters@perl.org
	Subject: Re: [ID 20000114.001] Perl rename function can delete files


	At 13:30 -0500 2000-01-14, Moss, Jeff wrote:
	>There is a problem with the "rename" function in the latest builds
	>of ActiveState Perl, dating at least back to build 515.  The system
	>I'm running is WinNT 4.0 on Intel with Perl 5.005_03 build 521.
	>
	>If you use "rename" to change the case of a file name on a network
	>volume the file just gets deleted.

	Ouch!  That's serious.  I don't run perl on Win* systems myself.
Can 
	someone else on the list confirm this behaviour with stable and 
	development perls?

	>I will be happy to add code to only use this flag when renaming
across
	>volumes if you can tell me where to send it.

	As a reply to this mail.  That'll make it hit the perl5-porters list

	and flag it as related to the initial bug report.  If you can format

	your changes as a UNIX-style patch, so much the better.  But, if you

	can't, send whole modified files either as attachments or (if you 
	only touch one file) in the body of the mail.

	Thanks.

	-- 
	Dominic Dunlop


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]