From bf8a128fa6a73bf1315fe9b5ab22f24af83fab8c Mon Sep 17 00:00:00 2001 From: Fx Date: Sun, 1 Mar 2020 15:07:59 +0800 Subject: [PATCH] Use the backup to solve the residual after deleting the code. --- app/src/main/java/org/autojs/autojs/ui/edit/EditorView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/autojs/autojs/ui/edit/EditorView.java b/app/src/main/java/org/autojs/autojs/ui/edit/EditorView.java index 5c5226520..00ac8df38 100644 --- a/app/src/main/java/org/autojs/autojs/ui/edit/EditorView.java +++ b/app/src/main/java/org/autojs/autojs/ui/edit/EditorView.java @@ -427,6 +427,8 @@ public void redo() { } public Observable save() { + String path = mUri.getPath(); + PFiles.move(path, path + ".bak"); return Observable.just(mEditor.getText()) .observeOn(Schedulers.io()) .doOnNext(s -> PFiles.write(getContext().getContentResolver().openOutputStream(mUri), s))