[PD] [file]: paths not relative to patch

Roman Haefeli reduzent at gmail.com
Fri Jan 7 23:15:15 CET 2022


On Fri, 2022-01-07 at 22:58 +0100, Roman Haefeli wrote:
> 
> What I think should happen when instantiating any [file] objects is
> to
> set the working directory to the patch's directory and not to Pd's
> start directory. 

I was wondering how objects before [file] did select a path for
writing. If I am not mistaken, [text] uses canvas_makefilename() for
converting a given path or filename to an absolute path. It first
checks if the given path is absolute by checking for '/' (first byte)
or ':' (second byte) and prepends the canvas' own directory to it, if
is relative. It's basically a clumsy way to switch the working
directory to the patch's directory. And it's what I have to do now when
using [file]. 

I need to be enlightened: What is the benefit of using Pd's start
location as working directory in [file]?

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220107/67e1fa7a/attachment.sig>


More information about the Pd-list mailing list