Mariano,

I think your problem might have something to do with how the PWD env var is managed in OSX ... Check the value of the 'PWD' in your different examples and see if that sheds any light ...

Dale

On 7/26/16 5:49 AM, Mariano Martinez Peck wrote:


On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck <[email protected] <mailto:[email protected]>> wrote:

    Hi guys,

    Davide Varvello reported me an issue with Fuel, failing to do:

    FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.

    Such a thing would bring an error like this:

    File>>openForWrite:
    File>>openForWrite
    File>>writeStream
    File>>writeStreamDo:
    FLPharo5Platform>>fileNamed:writeStreamDo:
    FLSerializer>>serialize:toFileNamed:
    FLSerializer class>>serialize:toFileNamed:

    The code is:

    FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
    ^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
    stream binary.
    aBlock value: stream ]


    Now..I have tried to reproduce it but it happens only depending on
    how the vm/image was started!!! And I only tested on OSX.

    Download the oneclick from here:
    http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:

    1) Executing VM from command line and passing the image as
    argument: WORKS.
    2) Double clicking on the internal Pharo binary (which auto-starts
    the image): WORKS
    3) Double clicking the internal Pharo image and then "Open With"
    and I select the Pharo VM: DOES NOT WORK.
    4) Double clicking the Pharo one click: DOES NOT WORK.


I forgot to said... if you create the file in advance, with something like:

FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream | FLSerializer serialize: 'whatever' on: aStream binary ]

It does work in all cases.

    Has anyone experienced something like this? Looks like different
    file / directory permissions when starting in different ways?

    Thanks in advance,



-- Mariano
    http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com

Reply via email to