确保目录存在

nx2024TEMP
Matthew 7 months ago
parent a12eb15fc9
commit 802fa5f5ca

@ -219,8 +219,15 @@ public class MicroPhotoService extends Service {
try { try {
final String appPath = MicroPhotoContext.buildMpAppDir(this); final String appPath = MicroPhotoContext.buildMpAppDir(this);
File lockerFile = new File(appPath); File lockerFile = new File(appPath);
lockerFile = new File(lockerFile, "data/alive/running"); lockerFile = new File(lockerFile, "data/alive");
try {
lockerFile.mkdirs();
} catch (Exception ex) {
ex.printStackTrace();
}
lockerFile = new File(lockerFile, "running");
mAppRunningFile = new FileOutputStream(lockerFile); mAppRunningFile = new FileOutputStream(lockerFile);
for (int idx = 0; idx < 3; idx++) { for (int idx = 0; idx < 3; idx++) {

Loading…
Cancel
Save