From a21d31830e98aa213e90a02681ddcd4da4da42b1 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 5 Nov 2007 09:32:31 +0000 Subject: [PATCH] * Backpaddle from incompatible change: return file name instead of file path from MimePart.writeToFile() again as in Helma 1.6.0. --- src/helma/util/MimePart.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helma/util/MimePart.java b/src/helma/util/MimePart.java index 172e8a92..c50cc7b1 100644 --- a/src/helma/util/MimePart.java +++ b/src/helma/util/MimePart.java @@ -204,7 +204,7 @@ public class MimePart implements Serializable { * Write the mimepart to a file. * * @param dir the directory to write the file to - * @return the absolute path name of the file written, or null if an error occurred + * @return the name of the file written, or null if an error occurred */ public String writeToFile(String dir, String fname) { try { @@ -244,8 +244,8 @@ public class MimePart implements Serializable { fout.write(getContent()); fout.close(); } - // return absolute file path - return file.getPath(); + // return file name + return filename; } catch (Exception x) { System.err.println("Error in MimePart.writeToFile(): " + x); return null;