Skip to content
Open
Changes from 2 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 @@ -339,16 +339,19 @@ public void rename(
final boolean isDirectory,
final Activity context,
boolean rootmode) {
final Toast toast =
Toast.makeText(context, context.getString(R.string.renaming), Toast.LENGTH_SHORT);
toast.show();
HybridFile oldFile = new HybridFile(mode, oldPath);
HybridFile newFile;
if (Utils.isNullOrEmpty(newName)) {
newFile = new HybridFile(mode, newPath);
} else {
newFile = new HybridFile(mode, newPath, newName, isDirectory);
}
if (oldFile.getSimpleName().equals(newFile.getSimpleName())) {
return;
}
final Toast toast =
Toast.makeText(context, context.getString(R.string.renaming), Toast.LENGTH_SHORT);
toast.show();
Operations.rename(
oldFile,
newFile,
Expand Down