Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fac93c14 authored by jing.zhao's avatar jing.zhao Committed by Gerrit Code Review
Browse files

CMFileManager: when cancel coping, the dest file also exists and is incomplete.

When cancel coping, will delete the dest file.

Change-Id: I0acf7cc196dec82ed2156e9706c1364922581cdf
parent 6e0bd517
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1198,6 +1198,11 @@ public final class FileHelper {
                    bos.close();
                }
            } catch (Throwable e) {/**NON BLOCK**/}
            if (program.isCancelled()) {
                if (!dst.delete()) {
                    Log.e(TAG, "Failed to delete the dest file: " + dst);
                }
            }
        }
    }