delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/07/30/04:04:49

From: "Andrew Cottrell" <AndrewCottrell AT swiftdsl DOT com DOT au>
To: <djgpp-workers AT delorie DOT com>
Subject: RE: mv bug (filutils? library?)
Date: Wed, 30 Jul 2003 18:03:51 +1000
Message-ID: <000101c35671$204ee380$0101a8c0@acp42g>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.4510
Importance: Normal
In-Reply-To: <10307291936.AA13490@clio.rice.edu>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h6U84QK32704
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Noticed by someone else and passed onto me:
> 
> Create a directory with long name:
> 
> mkdir thisisalong
> cd thisisalong
> mkdir junk
> mv junk junk
> 
> This will create junk\junk\... nesting until it fails.
> 
> If you do the test under a short name it seems to work 
> correctly (gives a message about cannot move 'junk' to a 
> subdirectory of itself).
> 
> I have verified this behavior under Win98 and Windows 2000 
> using an older copy of the filutils - but I am told it is 
> seen on newer versions as 
> well.
> 
> A quick look at copy.c source seems that 'copy_into_self' 
> flag doesn't work properly if path contains long names.

The solution is to make sure you are using the latest file utils and not 4.0
or earlier. From memory last year, as such there may be some mistakes in my
response below:-

When working on some re-builds last year of the 2.04 there were a series of
problems found with fileutils 4.0 and the 2.04 code, one of them was this
and another was a problem with rm where it could wipe the hard drive under
some very specific conditions (I think it may have been very deep directory
tree or something like that).

I personally seen the problem above with file utils 4.0 and the 2.04 code
from sometiem last year (50% chance arround May-July time frame). 

The fix required a modifiaction to the fileutils and I think it was done as
an update to the fileutils 4.1 as it was being released or had just been
released at about the same time.

Hope this helps.

IMHO:- If it does exist in the latest versions on Win 98 then try the
filutils built with the 2.04 alpha release. In either case under 2K (or XP)
I would use the fileutils built with 2.04 as there are some changes to the
file IO that have not made it into the 2.03 refresh and the 2.04 is very
stable.

Regards,
Andrew


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019