On Thu, 5 Aug 1999, Erik A Pearson wrote:
>
> >
> >Not sure what you mean here. Could you provide more info or a patch
> >and some example code?
I looked over the src/jacl/tcl/lang/FileUtil.java and the method
getNewFileObj. In the 1.0 release of Jacl it was defined like this.
static File
getNewFileObj(
Interp interp, // Current interpreter.
String fileName) // File to create object for.
throws
TclException
{
File f;
fileName = translateFileName(interp, fileName);
if (getPathType(fileName) == PATH_ABSOLUTE) {
f = new File(fileName);
} else {
f = new File (interp.getWorkingDir(), fileName);
}
return f;
}
Your note says that the changes you made were brought over from 1.0
but I do not see where. Was that a 1.0 alpha release or something?
If your change fixes a bug under NT, I would like to add it before
the 1.2.4 release but I need some proof that there is actually a bug.
Could you privide some test cases that demonstrate this bug in
the 1.2.3 release? Some test cases and the output they produce both
before and after the patch would make my life a lot easier.
later
mo
> Sure, the code from fileUtil is below. I believe this was necessary for running
> under NT:
>
>
> static File
> getNewFileObj(
> Interp interp, // Current interpreter.
> String fileName) // File to create object for.
> throws
> TclException
> {
> final boolean debug = false;
> fileName = translateFileName(interp, fileName);^M
> */
>
> static File
> getNewFileObj(
> Interp interp, // Current interpreter.
> String fileName) // File to create object for.
> throws
> TclException
> {
> final boolean debug = false;
> fileName = translateFileName(interp, fileName);^M
> /* ^M
> * EP:05/02/1999: Added this to 1.2, copied from 1.0 code.^M
> * EP:05/20/1998: Added code to handle PATH_VOLUME_RELATIVE^M
> * EP:05/20/1998: This involves changing the path type detection and^M
> * EP:05/20/1998: ensuing conditional expression from if to ^M
> * EP:05/20/1998: a switch.^M
> */^M
> int pathType = getPathType(fileName);^M
> File f=null;^M
> switch (pathType) {^M
> case PATH_VOLUME_RELATIVE:^M
> f = new File(fileName);^M
> break;^M
> case PATH_ABSOLUTE:^M
> f = new File(fileName);^M
> break;^M
> // In this case we just get the current working^M
> // drive letter.^M
> // String path_prepend = interp.getWorkingDir().toString().substring(0,
> 3);^M
> // f = new File(path_prepend, fileName);^M
> // break;^M
> case PATH_RELATIVE:^M
> // Here we need to get the current working directory.^M
> f = new File(interp.getWorkingDir(), fileName); ^M
> break;^M
> }^M
> return (f);^M
>
> /* if (debug) {
> System.out.println("File name is \"" + fileName + "\"");
> }
> if (getPathType(fileName) == PATH_ABSOLUTE) {
> if (debug) {
> System.out.println("File name is PATH_ABSOLUTE");
> }
> return new File(fileName);
> } else {
> if (debug) {
> System.out.println("File name is relative");
> }
> return new File(interp.getWorkingDir(), fileName);
> }^M
> */
> }
>
> >
> >> 1. add support to handle PATH_VOLUME_RELATIVE in FileUtil
----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
A list archive is at: http://www.findmail.com/listsaver/tcldallas/