IDEA-112133 newline can be pasted into file rename dialog

This commit is contained in:
Anna Kozlova
2013-08-16 11:28:52 +04:00
parent e1e583734a
commit 177832176b
@@ -46,6 +46,6 @@ public class RenameToIgnoredDirectoryFileInputValidator implements RenameInputVa
@Override
public boolean isInputValid(String newName, PsiElement element, ProcessingContext context) {
return newName != null && newName.length() > 0 && newName.indexOf('\\') < 0 && newName.indexOf('/') < 0;
return newName != null && newName.length() > 0 && newName.indexOf('\\') < 0 && newName.indexOf('/') < 0 && newName.indexOf('\n') < 0;
}
}