Bug 365 : data path mangled when I use emacs
Last modified: 2006-06-28 11:46




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
Max Kaufmann
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2006-06-28 10:52
the following program:

print(dataPath(""));

Outputs:
"C:/Documents and Settings/.../data/"

and everything is cool. However if I choose to use an external editor (in
my case emacs), write the code and run it I get the same output most of the
time, but SOMETIMES I get:

"null/data/"

And consequently other references to path-dependant methods like
loadString() fail.
Additional Comment #1 From Max Kaufmann 2006-06-28 11:23
update:

okay, I've done some tinkering and I have identified the error condition:
------------
print(dataPath(""));
------------

works, however:
------------
print(dataPath(""));
setup() {
}
------------

fails if I write it in emacs.
Additional Comment #2 From fry 2006-06-28 11:46
you can't use dataPath() until init has run, which means it has to be used
inside setup().