Rename() broken again?

Michael A. Chase mchase@ix.netcom.com
Sun May 20 12:46:00 GMT 2001


It also works as you are expecting in my system.
   WinNT Ver 4.0 build 1381 Service Pack 4
   Cygwin 1.3.1-1 (build date: Tue Apr 24 20:01:02 EDT 2001)
   NTFS

The problem is probably in the way Win9x FAT directories are tightly bound
to the file data.  The easiest way to confirm this would be to try the same
test with Win9x and Cygwin 1.1.7.  If it works as expected with that
configuration, then there may be a bug to squash.

--
Mac :})
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Stewart Greenhill" <sgreenhill@iprimus.com.au>
To: <cygwin@cygwin.com>
Sent: Sunday, May 20, 2001 07:31
Subject: Rename() broken again?


> I reported this problem under 1.1.2 and it was fixed for 1.1.3. It seems
> that it may have returned...
>
> Unix file semantics should allow open files to be renamed. If all is well,
> the following code fragment should not return an error.
>
> #include <stdio.h>
>
> char * oldName = "test.file^";
> char * newName = "test.file";
>
> int main(int argc, char ** argv) {
>         int result;
>         FILE * f = fopen(oldName, "w");
>
>         result = rename(oldName, newName);
>         if (result != 0) {
>                 perror("Rename");
>         } else {
>                 printf("OK!");
>         }
>         fclose(f);
> }
>
> I can verify that this works properly under cygwin 1.1.7 on Windows NT 4.
A
> user has reported problems under Windows 98 with the latest release of
> cygwin. His system:
>  OS: Win98se german
>  File system: Fat32 6GB and 74GB on a 3x30GB RAID
>  Cygwin: Downloaded from official site on 18.May.2001 (dll-ver 1.3.1)
>
> His result with the above example:
>   Rename: Permission denied
>
> This breaks the OOC Oberon-2 compiler (ooc.sourceforge.net).
>
> This seems to be a bug. Could someone please check what's happening here?



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list