Fix #10988
This commit is contained in:
parent
b7dd8dca05
commit
f692339a36
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ public class RenameFileBottomSheet extends MenuBottomSheetDialogFragment {
|
|||
File dest;
|
||||
int index = file.getName().lastIndexOf('.');
|
||||
String ext = index == -1 ? "" : file.getName().substring(index);
|
||||
String newName = Algorithms.getFileNameWithoutExtension(selectedFileName);
|
||||
String newName = selectedFileName;
|
||||
if (selectedFileName.endsWith(ext)) {
|
||||
newName = selectedFileName.substring(0, selectedFileName.lastIndexOf(ext));
|
||||
}
|
||||
if (SQLiteTileSource.EXT.equals(ext)) {
|
||||
dest = renameSQLiteFile(app, file, newName + ext, null);
|
||||
} else if (IndexConstants.GPX_FILE_EXT.equals(ext)) {
|
||||
|
|
Loading…
Reference in a new issue