projects
/
org.ibex.mail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ad869c
)
minor fixup to FileBasedMailbox
author
adam
<adam@megacz.com>
Fri, 22 Oct 2004 00:09:12 +0000
(
00:09
+0000)
committer
adam
<adam@megacz.com>
Fri, 22 Oct 2004 00:09:12 +0000
(
00:09
+0000)
darcs-hash:
20041022000912
-5007d-
6bcd45a370b17d0b3438605582ed53def092fc2f
.gz
src/org/ibex/mail/target/FileBasedMailbox.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/mail/target/FileBasedMailbox.java
b/src/org/ibex/mail/target/FileBasedMailbox.java
index
10dd7f9
..
ae42112
100644
(file)
--- a/
src/org/ibex/mail/target/FileBasedMailbox.java
+++ b/
src/org/ibex/mail/target/FileBasedMailbox.java
@@
-160,7
+160,9
@@
public class FileBasedMailbox extends Mailbox.Default implements Serializable {
public Message cur() {
if (done()) return null;
try {
public Message cur() {
if (done()) return null;
try {
- File file = new File(entry().path);
+ String where = entry().path;
+ if (!new File(where).exists()) where = where.substring(0, where.lastIndexOf('.')+1);
+ File file = new File(where);
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
@@
-182,7
+184,7
@@
public class FileBasedMailbox extends Mailbox.Default implements Serializable {
prevayler.execute(new Transaction() {
public void executeOn(Object c, Date d) {
new File(entry.path).delete();
prevayler.execute(new Transaction() {
public void executeOn(Object c, Date d) {
new File(entry.path).delete();
- cache.remove(entry);
+ if (cache.contains(entry)) { cache.remove(entry); }
}});
}
}
}});
}
}