private File getFileToRestore(LocalIndexInfo i) { if (i.isBackupedData()) { File parent = new File(i.getPathToData()).getParentFile(); if (i.getType() == LocalIndexType.GPX_DATA) { parent = settings.extendOsmandPath(ResourceManager.GPX_PATH); } else if (i.getType() == LocalIndexType.MAP_DATA) { parent = settings.extendOsmandPath(ResourceManager.MAPS_PATH); } else if (i.getType() == LocalIndexType.POI_DATA) { parent = settings.extendOsmandPath(ResourceManager.POI_PATH); } else if (i.getType() == LocalIndexType.TILES_DATA) { parent = settings.extendOsmandPath(ResourceManager.TILES_PATH); } else if (i.getType() == LocalIndexType.VOICE_DATA) { parent = settings.extendOsmandPath(ResourceManager.VOICE_PATH); } else if (i.getType() == LocalIndexType.TTS_VOICE_DATA) { parent = settings.extendOsmandPath(ResourceManager.VOICE_PATH); } return new File(parent, i.getFileName()); } return new File(i.getPathToData()); }
private File getFileToBackup(LocalIndexInfo i) { if (!i.isBackupedData()) { return new File(settings.extendOsmandPath(ResourceManager.BACKUP_PATH), i.getFileName()); } return new File(i.getPathToData()); }