Skip to content

Commit

Permalink
fix: Do not allow creating file with name and format that already exi…
Browse files Browse the repository at this point in the history
…sts #1
  • Loading branch information
CyberGlitch01 committed Nov 17, 2023
1 parent 219732e commit 2df10bc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ public void afterTextChanged(Editable arg0) {}
if (FileNameValidator.isValidFileName(binding.fileName.getText().toString())) {
boolean isNameInUse = false;
for (int i = 0; i < fileList.size(); ++i) {
if (fileList.get(i).getFilePath() == binding.fileName.getText().toString()) {
if (fileList
.get(i)
.getFilePath()
.toLowerCase()
.equals(binding.fileName.getText().toString().toLowerCase())) {
int fileType = fileList.get(i).getFileType();
int fileCreatingButton = binding.fileTypeChooser.getCheckedButtonId();
if (fileCreatingButton == R.id.html) {
Expand Down

0 comments on commit 2df10bc

Please sign in to comment.