delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/31/13:59:11

Date: Sun, 31 Dec 2000 20:56:53 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
Message-Id: <1225-Sun31Dec2000205652+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <NEBBIOJNGMKPNOBKHCGHKECNCAAA.tim.van.holder@pandora.be>
Subject: Re: DOZE and WINDOZE versions
References: <NEBBIOJNGMKPNOBKHCGHKECNCAAA DOT tim DOT van DOT holder AT pandora DOT be>
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

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Sun, 31 Dec 2000 16:42:15 +0100
> 
> > I've tried running "mv a b" with success. Doesn't mv use rename()?
> No; IIRC, it is basically a cp followed by an rm, code-wise.

Actually, `mv' tries to call `rename' first, and only if that fails,
it falls back on copy/remove.

> Below is a simple program that lowercases all file and directory
> names in the current dir. Does this work on WinME too?

As I wrote elsewhere, the problems which were reported on c.o.m.d. had
to do with the target of rename already existing.

>   strcpy (lowername, name);
>   strlwr (lowername);
>   if (strcmp (name, lowername) != 0) {
>     printf ("%s -> %s\n", name, lowername);
>     if (rename (name, lowername) != 0) {

This is not supposed to work with stock v2.03.  I only committed
yesterday the changes that make this work, so before that, even the
CVS version won't DTRT.

- Raw text -


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