* Backpaddle from incompatible change: return file name instead of
file path from MimePart.writeToFile() again as in Helma 1.6.0.
This commit is contained in:
parent
6d2f294252
commit
a21d31830e
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue