[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in
From: |
Alan Post |
Subject: |
Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists? |
Date: |
Sat, 8 Oct 2011 14:16:16 -0600 |
On Sat, Oct 08, 2011 at 04:11:47PM -0400, John Cowan wrote:
> Christian Kellermann scripsit:
>
> > Wouldn't the right answer be in this case "We don't know whether this
> > file exists, because some Bad Thing(tm) happened while trying to find
> > out" instead of yes or no?
>
> No. If ENAMETOOLONG is returned, the file can't possibly exist (because
> the filesystem has no way to represent it), so it's always correct to
> return #f in that case.
>
> > Depending on my use case I might be screwed either way if file-exists?
> > returns a valid answer.
>
> Only in the sense that if it returns #f you may then try to create it,
> which will fail with another ENAMETOOLONG (which in this case should raise
> a Scheme exception). So you have to be prepared for create to fail even
> if file-exists? returns #f (as in many other cases: permissions, e.g.)
>
Thank you John, that is a better articulation of why one would
handle ENAMETOOLONG than I gave.
-Alan
--
.i ma'a lo bradi cu penmi gi'e du
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, (continued)
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Christian Kellermann, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Alan Post, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Christian Kellermann, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Alan Post, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Christian Kellermann, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, John Cowan, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, John Cowan, 2011/10/10
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Christian Kellermann, 2011/10/10
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, John Cowan, 2011/10/10
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, John Cowan, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?,
Alan Post <=
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Alan Post, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Alan Post, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, John Cowan, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Christian Kellermann, 2011/10/08
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Peter Bex, 2011/10/09
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, Felix, 2011/10/09
- Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?, John Cowan, 2011/10/09