protected Path list(final Session<?> session) throws BackgroundException {
Path home;
AttributedList<Path> list;
try {
home = session.getFeature(Home.class).find();
cache.invalidate(home);
final SessionListWorker worker = new SessionListWorker(cache, home, listener);
listener.message(worker.getActivity());
list = worker.run(session);
}
catch(NotfoundException e) {
log.warn(String.format("Mount failed with %s", e.getMessage()));
home = new Path(String.valueOf(Path.DELIMITER), EnumSet.of(Path.Type.volume, Path.Type.directory));
cache.invalidate(home);
final SessionListWorker worker = new SessionListWorker(cache, home, listener);
listener.message(worker.getActivity());
list = worker.run(session);
}
cache.put(home, list);
return home;
}