Просмотр исходного кода

Use ide.validFileRegex, not hard coded regex

James Allen 10 лет назад
Родитель
Сommit
21f88bb20e

+ 1 - 1
services/web/public/coffee/ide/file-tree/controllers/FileTreeEntityController.coffee

@@ -30,7 +30,7 @@ define [
 		$scope.finishRenaming = () ->
 			name = $scope.inputs.name
 			
-			if !name.match(/^[^\*\/]*$/)
+			if !name.match(new RegExp(ide.validFileRegex))
 				# Showing the modal blurs the rename box which calls us again
 				# so track this with the invalidModalShowing flag
 				return if invalidModalShowing