]> source.dussan.org Git - nextcloud-server.git/commitdiff
Show error message to prevent adding a shared folder in the root dir fix #468
authorBrice Maron <brice@bmaron.net>
Fri, 16 Nov 2012 14:59:14 +0000 (14:59 +0000)
committerBrice Maron <brice@bmaron.net>
Fri, 16 Nov 2012 14:59:14 +0000 (14:59 +0000)
apps/files/js/files.js

index 982351c589ebf4fea5f6d1e8e8e10d3d3af955ec..abde963e42345c21fe5c7260d6b068275507860c 100644 (file)
@@ -495,6 +495,10 @@ $(document).ready(function() {
                                $('#notification').text(t('files','Invalid name, \'/\' is not allowed.'));
                                $('#notification').fadeIn();
                                return;
+                       } else if( type == 'folder' && $('#dir').val() == '/' && $(this).val() == 'Shared') {
+                               $('#notification').text(t('files','Invalid folder name. Usage of "Shared" is reserved by Owncloud'));
+                               $('#notification').fadeIn();
+                               return;
                        }
                        var name = getUniqueName($(this).val());
                        if (name != $(this).val()) {