Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!iuvax!rutgers!att!chinet!saj From: saj@chinet.chi.il.us (Stephen Jacobs) Newsgroups: comp.sys.atari.st Subject: Re: TOS bugs. Disk related. Summary: Where should we look for resource files? Message-ID: <8170@chinet.chi.il.us> Date: 8 Apr 89 15:36:51 GMT References: <763@stag.UUCP> <1426@atari.UUCP> <460@electro.UUCP> <1435@atari.UUCP> <465@electro.UUCP> Organization: Chinet - Chicago, Ill. Lines: 30 In article <465@electro.UUCP>, ignac@electro.UUCP (Ignac Kolenko) writes: [A lot of good stuff from Ignac, Allan & Ken] > >TOS 1.4 has a new feature in this area: shell_find (which rsrc_load uses > >to find resource files) now looks in more places, including the place > >where the application was loaded from, even if that's not the current > >directory. Therefore an "installed" application will find its resource > >file no matter where it lives, as long as the resource file and the > >application are in the same place. There are more details in this > >area; see the TOS 1.4 release notes for full details. > > > on the topic of this shel_find() call, will rsrc_load() calls from now on > in tos 1.4 use the PATH environment variable to search for resource files. > is so, thank you. there's nothing more irritating than having a program > not able to locate its resource file: up until now, it seemed to have > searched only the current directory, then drive A. This brings up the question of where a program really should search for its resource file. The question doesn't have a self-evident answer. As stated, present behavior seems to be 1)current directory; 2)A:\. On the surface, it looks reasonable to search the path, but suppose there's another resource file with the same name earlier in the path? (this is easy to do while programming--one tends to experiment in subdirectories). So maybe find the first program in the path with the same name as the program doing the search, and look for the resource in the directory that contains it. Or maybe there should be an environment variable (like PATH=) (maybe RSPATH= ?). Anyone have any strong feelings? Steve J.