Skip to content

Commit

Permalink
Merge pull request #1590 from nextcloud/issue-1432-special-chars-on-n…
Browse files Browse the repository at this point in the history
…ame-conflict

Fix special characters when renaming to a conflict
  • Loading branch information
MorrisJobke authored Oct 3, 2016
2 parents 08b0e5c + 0ecaf8e commit 62d5daa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,9 @@
// Files.isFileNameValid(filename) throws an exception itself
OCA.Files.Files.isFileNameValid(filename);
if (self.inList(filename)) {
throw t('files', '{newName} already exists', {newName: filename});
throw t('files', '{newName} already exists', {newName: filename}, undefined, {
escape: false
});
}
}
return true;
Expand Down
4 changes: 3 additions & 1 deletion apps/files/js/newfilemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@
if (!Files.isFileNameValid(filename)) {
// Files.isFileNameValid(filename) throws an exception itself
} else if (self.fileList.inList(filename)) {
throw t('files', '{newname} already exists', {newname: filename});
throw t('files', '{newName} already exists', {newName: filename}, undefined, {
escape: false
});
} else {
return true;
}
Expand Down

0 comments on commit 62d5daa

Please sign in to comment.