in reply to [OT] rename(2) -- renaming file to itself produces no error.

I guess you have two choices here:

1) rewrite the rename function.
2) check to see if the file exist before you rename it.

As to why it does NOT report an error ... I guess who ever wrote the rename function did NOT feel like this is an error.

Plankton: 1% Evil, 99% Hot Gas.
NOTs added after dmitri pointed out my mistake. Kinda of ironic ain't it. :/
  • Comment on Re: [OT] rename(2) -- renaming file to itself produces no error.

Replies are listed 'Best First'.
Re: Re: [OT] rename(2) -- renaming file to itself produces no error.
by dmitri (Priest) on Jan 07, 2004 at 23:22 UTC
    You mean, s/does/does not/ && s/did/did not/, right?