Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

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

Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug Milestone-2.0 Difficulty-Easy

New issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

Pharo2.0a
Latest update: #20150

     DiskStore>>directoryAt:ifAbsent:nodesDo:
        ...
        entry := Primitives lookupEntryIn: encodedPathString index: index.
        entry = #badDirectoryPath
                ifTrue: [ ^ absentBlock value ].
        ...

#lookupEntryIn:index: returns #badDirectoryPath for reasons other than the  
entry not existing (e.g. not enough permissions). So if the entry exists  
but the primitive fails, the absentBlock is incorrectly evaluated.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Status: FixReviewNeeded

Comment #1 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

Fix in inbox:  
SLICE-Issue-6122-BUG-DiskStoregtgtdirectoryAtifAbsentnodesDo-SeanDeNigris.1

Fix DiskStore>>directoryAt:ifAbsent:nodesDo: to only evaluate the  
absentBlock when the directory doesn't exists, not on other file system  
errors

To see the problem/solution:
   pre-fix:
     - where aFileReference is to a directory where you don't have  
permissions
     "aFileReference entries." -> DirectoryDoesNotExist
   post fix - same signals a resumable FileSystemError.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Status: Workneeded

Comment #2 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

Sorry, the change requires deeper changes to work. Let's restart  
discussion :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo

Comment #3 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

Sure, let's discuss, but the fix seemed to work on Mac Lion. What's the  
problem specifically. If anything, it's *very* broken now, so let's apply  
the fix and then discuss


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo

Comment #4 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

the main thing was that you were mixing up levels (not that it is obivous  
in the fs implementation :P), but as soon as you are in FS you should reuse  
the resolvable. You went over the complete FileReference again.

Maybe I misunderstood, but #exists: will use the same #badDirectory hack no?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo

Comment #5 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

"#exists: will use the same #badDirectory hack no?"
It worked in my image, so I guess not...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Labels: Filesystem

Comment #6 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Status: WorkNeeded

Comment #7 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Labels: -Filesystem Target-Filesystem

Comment #8 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Labels: -Milestone-2.0

Comment #9 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6122 in pharo: [BUG]: DiskStore>>directoryAt:ifAbsent:nodesDo:

pharo
Updates:
        Cc: [hidden email]

Comment #10 on issue 6122 by [hidden email]: [BUG]:  
DiskStore>>directoryAt:ifAbsent:nodesDo:
http://code.google.com/p/pharo/issues/detail?id=6122

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker