Commit ad16ccf 1 parent 2976ce4 commit ad16ccf Copy full SHA for ad16ccf
File tree 1 file changed +9
-5
lines changed
Ports/Android/src/com/codename1/impl/android
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -6702,11 +6702,15 @@ private String fixAttachmentPath(String attachment) {
6702
6702
6703
6703
File newFile = new File (mediaStorageDir .getPath () + File .separator
6704
6704
+ cn1File .getName ());
6705
- if (newFile .exists ()) {
6706
- // Create a media file name
6707
- String timeStamp = new SimpleDateFormat ("yyyyMMdd_HHmmss" ).format (new Date ());
6708
- newFile = new File (mediaStorageDir .getPath () + File .separator
6709
- + "IMG_" + timeStamp + "_" + cn1File .getName ());
6705
+ if (newFile .exists ()) {
6706
+ if (Display .getInstance ().getProperty ("DeleteCachedFileAfterShare" , "false" ).equals ("true" )) {
6707
+ newFile .delete ();
6708
+ } else {
6709
+ // Create a media file name
6710
+ String timeStamp = new SimpleDateFormat ("yyyyMMdd_HHmmss" ).format (new Date ());
6711
+ newFile = new File (mediaStorageDir .getPath () + File .separator
6712
+ + "IMG_" + timeStamp + "_" + cn1File .getName ());
6713
+ }
6710
6714
}
6711
6715
6712
6716
You can’t perform that action at this time.
0 commit comments