Commit ff16dc0a authored by toaster's avatar toaster
Browse files

fixed missing directory problem and swap npe

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@112 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent ae63fcb7
......@@ -285,7 +285,11 @@ public class SwapFileAccess extends StorageDriver {
@Override
public DriverStateBean[] getState() {
return it.getStateBeans();
if (it == null) {
return new DriverStateBean[0];
} else {
return it.getStateBeans();
}
}
};
......
......@@ -697,6 +697,7 @@ public final class AuditThread extends Thread implements CancelCallback {
trans.begin();
for (MonitoredItem mi : mim.listItemsBefore(coll, d)) {
LOG.trace("Updating missing item: " + mi.getPath());
if (mi.getState() != 'M' && (mi.getStateChange() == null || d.after(
mi.getStateChange()))) {
mi.setState('M');
......
......@@ -83,7 +83,9 @@ public class MonitoredItemManager {
if ( (mi = getItemByPath(directory, c)) != null ) {
EntityTransaction trans = em.getTransaction();
trans.begin();
mi.setLastSeen(new Date());
Date d = new Date();
mi.setLastSeen(d);
mi.setLastVisited(d);
mi.setState('A');
em.merge(mi);
trans.commit();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment