[Seaside] Re: Magma + seasidehosting
David T. Lewis
lewis at mail.msen.com
Fri Aug 25 15:25:25 UTC 2006
On Thu, Aug 24, 2006 at 10:09:24PM -0700, Chris Muller wrote:
> Hi Pablo, sorry for the delayed response.
> >From looking at the stack trace, it appears the problem is caused
> either by locked files or bugs or inconsistencies in UnixFileDirectory.
> Let me explain.
> In MaObjectFiler>>#open, Magma asks the UnixFileDirectory
> directory exists and: [ directory fileExists: self class
> objectsFilename ]
> and the system reported true for this, otherwise it would have stopped
> you right there with a MagmaEnvironmentError.
> Under this assumption, Magma then proceeds to open the object file.
> FileDirectory>>#fileNamed: is used to create the FileStream which is
> required by Magma. Unfortunately if some problem occurs,
> FileDirectory>>#fileNamed: doesn't signal a meaningful error, it only
> answers nil. Since we just checked fileExists: its not because it
> doesn't exist so is it possible the files are "locked" by another
> process or something? Did they get closed after the upload?
> Otherwise, there may be some bad inconsistency with
> UnixFileDirectory>>#fileExists: and UnixFileDirectory>>#fileNamed:.
> I'm no Unix expert, anyone else have any ideas?
I don't know if this relates to the original problem, but on Unix the
fact that a file exists does not imply that you have permission to open
it, read it, or write to it. It is quite normal to have a file that
exists but gives you a nil when you try to open it. Granted, it might
be nice if the exceptions were more helpful in this regard ;)
More information about the Seaside