final File dir = new File(sfd.getPath());
if (! dir.exists() || ! dir.isDirectory()) {
// this could happen with external storage ..
sfd.setScanState(ScanFolderState.NOT_FOUND);
didlDao.setOnline(sfd.getId(), false);
system.increaseUpdateId();
} else {
if (ScanFolderState.NOT_FOUND.equals(sfd.getScanState())) {
didlDao.setOnline(sfd.getId(), true);
system.increaseUpdateId();
}