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);
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); }
}});
}
}