[Newbies] Is it me, or a problem with FileDirectory?

David Lomas dl3 at pale-eds.co.uk
Fri Jun 15 10:17:15 UTC 2012

I've been trying to debug an application running on Squeak 4.1 randomly
crashing on certain setups. It turns out it's where people have their 'My
Documents' folder on Windows platforms set to a network share.

As a trivial test case, I can trigger the error like this:

1. Set up a share (can be on the same machine) called 'share'
2. Check you can browse in Explorer to '\\server\share' - should be empty
3. Execute the following in a Workspace:

d := FileDirectory on: 'c:\NewDir'. d assureExistence.

That should create a directory called 'NewDir' on the root of the C drive
(assuming your machine has a C drive :), just to check everything is
working OK.

Now try:

d := FileDirectory on: '\\server\share\NewDir'. d assureExistence.

I get 'PrimitiveFailed: DosFileDirectory>>primCreateDirectory'. From what I
can tell, that method doesn't see '\\server\share' as effectively the
'root' of a filesystem and keeps stepping up a level. I don't know if
that's the fault of the FilePlugin module, or something else. For info, the
versions of the methods in the debug trace are:

DosFileDirectory>>primCreateDirectory: ar 2/2/2001 15:09
FileDirectory>>createDirectory: yo 2/24/2005 18:33
FileDirectory>>assureExistenceOfPath: jcg 5/10/2010 14:44
FileDirectory>>assureExistence: hg 2/2/2002 16:37

But my guess is that the problem is in FileDirectory>>directoryExists:, as
this is where there appears to be handling of special cases for certain
file systems. I can't see anything clever in there for UNC paths though.

See also
it's related, but I can't track down the fix that Bert referred to, to
see if it helps.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120615/9e6ea6f5/attachment.htm

More information about the Beginners mailing list