Add a timestamp to the settings backup too
This commit is contained in:
parent
9b0cb1a41d
commit
baaa910c65
1 changed files with 1 additions and 1 deletions
|
@ -486,7 +486,7 @@ public class ExportBackupService extends Service {
|
|||
boolean success = false;
|
||||
ObjectOutputStream output = null;
|
||||
try {
|
||||
final File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + File.separator + APP_DIRECTORY + File.separator + "Database" + File.separator, "settings.dat");
|
||||
final File file = new File(getBackupDirectory(null), "settings_" + ((new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss")).format(new Date()) + ".dat"));
|
||||
final File directory = file.getParentFile();
|
||||
if (directory != null && directory.mkdirs()) {
|
||||
Log.d(Config.LOGTAG, "created backup directory " + directory.getAbsolutePath());
|
||||
|
|
Loading…
Add table
Reference in a new issue