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

Jonathan LaCour panix-lists@skinnee.net
Mon, 9 Feb 2004 09:45:01 -0500


On Feb 9, 2004, at 7:41 AM, Paolo Molaro wrote:
> 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.

Which begs the question, why is it even allowed to have a "web.config" 
file?  Couldn't the whole problem be resolved if it was agreed that the 
only accepted naming for the config file is "Web.config", as it is on 
Windows in the first place?

I am fine with Paolo's suggestion as well, it just seems to be a little 
odd to allow for potentially confusing naming of configuration files, 
or even to print a warning.

Seems like a sane (and simple) solution.

Jon