[Mono-list] ASP.NET on Mac OS X

Paolo Molaro lupus@ximian.com
Mon, 9 Feb 2004 13:41:45 +0100


On 02/08/04 Jonathan LaCour wrote:
> >If this were a POSIX C program, I'd say that you should stat() both
> >files and only throw the exception if they have the same st_ino. But I
> >don't know if you can translate that into C#/.Net.
> 
> I didn't even think of that.  You are correct, knowing that you are on 
> Mac OS X actually doesn't fix the problem.  We need to manually check 
> to see if they are the same file.  My bug probably should be updated to 
> take this into account.
> 
> I will dig around a bit in corlib to see if there is any way for us to 
> programmatically determine if the files are the same.

There is no way to know that, unless Mono.Posix is used (and stat
implemented in it).
That said, I guess the issue here is: why does the code need to do the
check in the first place (and make the program die if the check fails)?
Is it to cover for people that copy the files from a windows box
first with a name and then with the other? In that case a warning may be
issued, but throwing an exceptions looks like overreacting.
I'd say we should just drop the check if there is no other reason for it.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better