mCopyToSystem = targetTvDataDir.mkdirs();
}
if(mCopyToSystem) {
try {
final CopyWaitingDlg waiting = new CopyWaitingDlg(new JFrame(), CopyWaitingDlg.EXPORT_SETTINGS_MSG);
mLog.info("Copy settings and TV data from TV-Browser transportable to system");
mShowWaiting = true;
Thread copyDataThread = new Thread("Copy TV data directory") {
public void run() {
try {
IOUtilities.copy(currentSettingsDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return !name.equalsIgnoreCase("tvdata")
&& !name.equals(targetSettingsDir.getName())
&& !name.equalsIgnoreCase("backup")
&& !name.equalsIgnoreCase("lang")
&& !name.equals(".lock");
}
}), targetSettingsDir);
sleep(5000);
IOUtilities.copy(currentTvDataDir.listFiles(), targetTvDataDir, true);
}catch(Exception e) {}
mShowWaiting = false;
waiting.setVisible(false);
}
};
copyDataThread.start();
waiting.setVisible(mShowWaiting);
}catch(Exception e) {
mCopyToSystem = false;
}
}
}