增加文件是否存在的判断

serial
BlueMatthew 1 year ago
parent 9d8779027f
commit 428c156365

@ -105,7 +105,7 @@ public class AppMaster {
final Context context = mService.getApplicationContext(); final Context context = mService.getApplicationContext();
String appPath = MicroPhotoContext.buildAppDir(context); String appPath = MicroPhotoContext.buildAppDir(context);
File mpappDb = new File(appPath + "data/App.db"); File mpappDb = new File(appPath + "data/App.db");
if (System.currentTimeMillis() - mpappDb.lastModified() > 1800000) { if (!mpappDb.exists() || ((System.currentTimeMillis() - mpappDb.lastModified()) > 1800000)) {
// greater than 30m // greater than 30m
MicroPhotoContext.restartMpApp(context); MicroPhotoContext.restartMpApp(context);
} }

Loading…
Cancel
Save