Skip to content

Commit

Permalink
Merge pull request clearw5#575 from Tubackup/master
Browse files Browse the repository at this point in the history
Use the backup to solve the residual after deleting the code.
  • Loading branch information
hyb1996 committed Mar 13, 2020
2 parents 8cab65e + bf8a128 commit 483c649
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/org/autojs/autojs/ui/edit/EditorView.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ public void redo() {
}

public Observable<String> 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))
Expand Down

0 comments on commit 483c649

Please sign in to comment.