Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ public void done(final HybridFile hFile, final boolean b) {
* DocumentFile.renameTo() may return false even when rename is successful. Hence we need an extra check
* instead of merely looking at the return value
*/
if (b || newFile.exists(context)) {
if (b
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't fix the issue (exists running on main thread) and seems incredibly easy to break if the implementation of Operations.rename changes (by changing how otg is handled or using DocumentFile for other file types). To fix the issue, the exists check should probably be moved to Operations.rename.

|| ((newFile.isDocumentFile() || newFile.isOtgFile())
&& newFile.exists(context))) {
Intent intent = new Intent(MainActivity.KEY_INTENT_LOAD_LIST);

intent.putExtra(
Expand Down