On Sat, 13 Mar 2010, Sven Schreiber wrote:
Allin Cottrell schrieb:
> On Sat, 13 Mar 2010, Sven Schreiber wrote:
>
>> Sven Schreiber schrieb:
>>> I have a script and a workfile in the same directory (and that directory
>>> is not the CWD or dotdir or anything). The script starts with the open
>>> command:
>>>
>>> open ea16_96m1_sven18feb10.gdt --quiet
>>>
>>> and after starting gretl everything works fine.
>>> However, when I modify the script a little bit, save it, and then
>>> execute it again, I get an error:
>>>
>>> ? open ea16_96m1_sven18feb10.gdt --quiet
>>>
>>> Fehler bei Skriptausführung: Stopp
>>>
>>> Restarting gretl cures the (apparently reproducible) issue.
>> actually it seems that it's enough to reload (close/open) the script
>> file to work around this issue
>
> I'm not convinced this is a bug. If you want to ensure that files
> in a particular (ad hoc) directory are found, the best way is to
> make that your PWD and choose the option to make your gretl
> working directory respect the PWD on start-up.
>
I was doubting it myself, but then I found this in the command ref:
"When a command script contains an instruction to open a data
file, the search order for the data file is as stated above,
except that the directory containing the script is also
searched, immediately after trying to find the data file as
is."
I've just experimented and I can't reproduce the problem you
describe. That is:
* In gretl GUI, open script from ad hoc location (not working
directory, not shell PWD) via File menu. This script starts with
a command to open a datafile with no explicit path given, and the
datafile in question is in the same ad hoc location.
* Run script; datafile is found OK as advertised.
* Make changes to script and save it. Re-run script. Datafile is
still found.
I don't doubt that you're seeing what you're seeing, but could you
give a little more detail? What does the script do, for instance?
Allin