Re: Issue 2228 in pharo: don't try to set the position of the file if it's not possible

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

Re: Issue 2228 in pharo: don't try to set the position of the file if it's not possible

pharo
Updates:
        Status: New

Comment #10 on issue 2228 by [hidden email]: don't try to set the  
position of the file if it's not possible
http://code.google.com/p/pharo/issues/detail?id=2228

(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 2228 in pharo: don't try to set the position of the file if it's not possible

pharo
Updates:
        Status: Accepted
        Cc: [hidden email]

Comment #11 on issue 2228 by marianopeck: don't try to set the position of  
the file if it's not possible
http://code.google.com/p/pharo/issues/detail?id=2228

Well this change was basically to move from:

        theFile position: filePositionHi.
        theFile position > theFile size ifTrue: [
                self error: 'RemoteString past end of file' ].
        ^ theFile nextChunkText


to

        filePositionHi > theFile size ifTrue: [
                self error: 'RemoteString past end of file' ].
        ^theFile
                position: filePositionHi;
                nextChunkText

so that the position is set only when valid.

Now...in squeak Levente only did it for #text and not for #string and  
#fileStream.
Do you know if they are also necessary?   In don't undersatnd why the "  
filePositionHi > theFile size ifTrue: "   is only for #text in squeak.  
Shouldn't it be the same for #string and #fileStream ?

If nobody answer I can prepare a slide with that I think could be ...


_______________________________________________
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 2228 in pharo: don't try to set the position of the file if it's not possible

pharo
Updates:
        Status: FixToInclude
        Labels: Milestone-1.4

Comment #12 on issue 2228 by marianopeck: don't try to set the position of  
the file if it's not possible
http://code.google.com/p/pharo/issues/detail?id=2228

Slice in inbox.

So I added the validation of

  "[filePositionHi > theFile size ifTrue: [
                self error: 'RemoteString past end of file' ]."
       
to #fileStream and #string. Since #text delegates to #string, it works  
there as well. What I dont understand is in which situation of position  
could be higher than the end of the file.....


_______________________________________________
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 2228 in pharo: don't try to set the position of the file if it's not possible

pharo
Updates:
        Status: Integrated

Comment #13 on issue 2228 by [hidden email]: don't try to set the  
position of the file if it's not possible
http://code.google.com/p/pharo/issues/detail?id=2228

in 14212


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