[PD-dev] another file path question for sp4d

Iain Duncan iainduncanlists at gmail.com
Fri Oct 8 17:01:14 CEST 2021


Hi folks, I want to solicit opinions from the broader Pd dev community
before figuring out how to fix this bug report from Alex:
https://github.com/iainctduncan/scheme-for-pd/issues/15

His point was that a relative path didn't do what he expected, situation
- an s4pd object created as "sp4d scm/my-file.scm"

So this is what I think should happen for file searching, but will change
my mind if it is not in accordance with what users would expect. The
handling rules will be the same whether from a a "read {file}" message or
an arg to the object:

Proposed Rules:
- absolute paths - opened
- single file name paths:
   - first look in the canvas directory
   - then search all Pd paths
- relative path names (i.e. "s4pd scm/foo.scm"):
  - search in the canvas directory
  - do *not* traverse through all directories on the Pd search paths

Does that sound right? Or would the expectation be that it would search for
scm/foo.js on all the search paths?

Related, should it know how to do the right thing to convert unix style
paths on windows?

Please feel free to comment here or on the github ticket.

thanks
iain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20211008/53e021fe/attachment.htm>


More information about the Pd-dev mailing list