#1089 msgfile fails to open text files


Pd-extended 43.4
Mac OSX 10.8.4

msgfile fails to open .txt files for writing text buffers. the message is "msgfile: failed to open file.txt"


1 Attachments


  • IOhannes m zmölnig

    could this be a permission problem?

    does it work if you specify the full path, e.g. "/tmp/file.txt" instead of "file.txt"?

  • Anonymous - 2013-07-01

    /usr/file.txt failed but /tmp/file.txt did not

    • IOhannes m zmölnig

      which is desired behaviour: in order to write to the /usr/ directory, you need super-cow powers.

  • Anonymous - 2013-07-01

    actually, with the attached patch only one line of "pants;" gets written

    • IOhannes m zmölnig

      is there a reason why you "bang" [msgfile] after each "add"?
      (if you remove the bang, everything is working as expected).

      anyhow, this is seems to be a different bug, please create a separate ticket.

  • Anonymous - 2013-07-01

    I realized after posting the example that I got the syntax wrong, however it seemed odd to me that write text.txt should work in textfile and not msgfile. Does this mean msgfile requires an absolute path and superuser permissions? if so do you know if it is possible to set those permissions for pd?

    • IOhannes m zmölnig

      super-user permissions are only required if you want to write files to places where an ordinary user should not write files to, e.g. '/usr' (which really is the system's infrastructure directory, and not the directory where every user puts their stuff).

      [msgfile] currently tries to create the file in the working directory of the Pd-process (which might be /), whereas [textfile] tries to create the file in the working directory of the abstraction containg [textfile] (that is: the directory where the .pd-file is saved).

      arguably, both are bad choices (files should be written in the directory of the master patch).

      for now, you might want to use absolute filenames.

  • Sebastian Shader

    that makes sense, thank you for the explanations. Perhaps this is something that should be included in the help file? At any rate, saving into my Documents folder using an absolute path worked great.

  • IOhannes m zmölnig

    • labels: msgfile zexy --> msgfile, zexy
    • status: open --> pending-fixed
    • assigned_to: IOhannes m zmölnig
  • IOhannes m zmölnig

    since rev.17574 [msgfile] should behave the same as [textfile] when writing to relative filenames.

    (that is: the file is saved relative to the canvas, rather than relative to Pd's working directory - which can be / on OSX...)



Cancel  Add attachments