* Convert file name to absolute path in constructor to work around java.io.File glitches.
Fixes bug 488 <http://helma.org/bugs/show_bug.cgi?id=488> (merge to helma_1_5 from HEAD)
This commit is contained in:
parent
c0cc7a633d
commit
be47e80327
1 changed files with 6 additions and 2 deletions
|
@ -50,11 +50,15 @@ public class FileObject extends ScriptableObject {
|
|||
}
|
||||
|
||||
protected FileObject(String fileName) {
|
||||
file = new File(fileName);
|
||||
// always convert to absolute file straight away, since
|
||||
// relative file name handling is pretty broken in java.io.File
|
||||
file = new File(fileName).getAbsoluteFile();
|
||||
}
|
||||
|
||||
protected FileObject(String pathName, String fileName) {
|
||||
file = new File(pathName, fileName);
|
||||
// always convert to absolute file straight away, since
|
||||
// relative file name handling is pretty broken in java.io.File
|
||||
file = new File(pathName, fileName).getAbsoluteFile();
|
||||
}
|
||||
|
||||
public static FileObject fileObjCtor(Context cx, Object[] args,
|
||||
|
|
Loading…
Add table
Reference in a new issue