|
|
@@ -124,17 +124,17 @@ public class OperationPresenter extends BasePresenter<IOperationView> {
|
|
|
File rawFile = new File(rawFilePath);
|
|
|
if (file != compressedFile) {
|
|
|
file.delete();
|
|
|
- if (!rawFilePath.contains("cache")) {
|
|
|
+ if (!rawFilePath.contains("/cache/")) {
|
|
|
compressedFile.delete();
|
|
|
} else {
|
|
|
- rawFile.delete();
|
|
|
+ boolean success = rawFile.delete();
|
|
|
MediaScannerConnection.scanFile(context, new String[] { compressedFile.getAbsolutePath() }, new String[] { "image/jpeg" }, null);
|
|
|
}
|
|
|
} else {
|
|
|
- if (!rawFilePath.contains("cache")) {
|
|
|
+ if (!rawFilePath.contains("/cache/")) {
|
|
|
file.delete();
|
|
|
} else {
|
|
|
- rawFile.delete();
|
|
|
+ boolean success = rawFile.delete();
|
|
|
MediaScannerConnection.scanFile(context, new String[] { file.getAbsolutePath() }, new String[] { "image/jpeg" }, null);
|
|
|
}
|
|
|
}
|