[squeak-dev] Problem with changes file write permissions on Mac OS X

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Problem with changes file write permissions on Mac OS X

Mikael Kindborg-2
Hi!

I have encountered a strange problem, at some point after filing in
code from a MC repository, it seems as if the changes file loses its
write permissions. The strange thing is that the changes file does
appear to have the correct write permissions, and I do not have
multiple images open. I have experimented with copying the image and
changes files over to a Windows file system (running in VirtualBox),
where everything works fine, and then copy them back again, with the
same result!

Does this ring any bells to those of you who are on Mac OS X ??
Perhaps I have overlooked something very simple...

Very best, Micke

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Problem with changes file write permissions on Mac OS X

Mikael Kindborg-2
Hi again!

Think I found the problem! Did some more experiments and it turns out
that the code I file in contains a FileDirectory subclass, and that
class incidentally becomes the default class for FileDirectory, and
messes everything up.

The subclass has no isActiveDirectoryClass method (but it has a
pathNameDelimiter method) , which means that a method in FileDirectory
makes it the default class. On Windows this does not happen, because
the pathNameDelimiter is different and does not match with the
delimiter returned by the subclass. The interesting code is in
FileDirectory activeDirectoryClass method, if anyone is interested. So
this has nothing to do with Mac OS X, but is a tricky aspect of
subclassing FileDirectory.

Sorry for the confusing explanation, kind of in a rush!

Best regards, Micke

2008/11/17 Mikael Kindborg <[hidden email]>:

> Hi!
>
> I have encountered a strange problem, at some point after filing in
> code from a MC repository, it seems as if the changes file loses its
> write permissions. The strange thing is that the changes file does
> appear to have the correct write permissions, and I do not have
> multiple images open. I have experimented with copying the image and
> changes files over to a Windows file system (running in VirtualBox),
> where everything works fine, and then copy them back again, with the
> same result!
>
> Does this ring any bells to those of you who are on Mac OS X ??
> Perhaps I have overlooked something very simple...
>
> Very best, Micke
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Problem with changes file write permissions on Mac OS X

johnmci
In reply to this post by Mikael Kindborg-2
Well the base squeak vm and image have no way to change the  
permissions on a file. So

(a) you have an FFI call that does that?
(b) I have painfully discovered in the past if you exceed the disk  
full threshold which is not 100% btw then writes to the disk will  
fail, so is your hard disk *nearly* full? I
believe it's a percentage of the total size, not a fixed value.
(c) I'm not sure if you exceed a certain size for the changes file if  
it becomes an issue.

On 17-Nov-08, at 8:12 AM, Mikael Kindborg wrote:

> Hi!
>
> I have encountered a strange problem, at some point after filing in
> code from a MC repository, it seems as if the changes file loses its
> write permissions. The strange thing is that the changes file does
> appear to have the correct write permissions, and I do not have
> multiple images open. I have experimented with copying the image and
> changes files over to a Windows file system (running in VirtualBox),
> where everything works fine, and then copy them back again, with the
> same result!
>
> Does this ring any bells to those of you who are on Mac OS X ??
> Perhaps I have overlooked something very simple...
>
> Very best, Micke
>

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================




Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Problem with changes file write permissions on Mac OS X

Mikael Kindborg-2
Hi, many thanks for the reply! I think the problem is related to the
subclass issue I wrote about in the previous message. When debugging
what was going on, I noticed that FileDirectory searches its
subclasses when deciding which default class to use, and as it
happened I had a subclass that was selected as the default
FileDirectory class this way, and that somehow (have not looked into
that part yes) caused the write-permission problem. This would also
explain that it worked on Windows (where the subclass is not selected
because it does not return the matching pathNameDelimiter) and failed
on Mac/Unix because of the delimiter match.
Very best regards, Micke

2008/11/17 John M McIntosh <[hidden email]>:

> Well the base squeak vm and image have no way to change the permissions on a
> file. So
>
> (a) you have an FFI call that does that?
> (b) I have painfully discovered in the past if you exceed the disk full
> threshold which is not 100% btw then writes to the disk will fail, so is
> your hard disk *nearly* full? I
> believe it's a percentage of the total size, not a fixed value.
> (c) I'm not sure if you exceed a certain size for the changes file if it
> becomes an issue.
>
> On 17-Nov-08, at 8:12 AM, Mikael Kindborg wrote:
>
>> Hi!
>>
>> I have encountered a strange problem, at some point after filing in
>> code from a MC repository, it seems as if the changes file loses its
>> write permissions. The strange thing is that the changes file does
>> appear to have the correct write permissions, and I do not have
>> multiple images open. I have experimented with copying the image and
>> changes files over to a Windows file system (running in VirtualBox),
>> where everything works fine, and then copy them back again, with the
>> same result!
>>
>> Does this ring any bells to those of you who are on Mac OS X ??
>> Perhaps I have overlooked something very simple...
>>
>> Very best, Micke
>>
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
>