From: Brice Maron Date: Fri, 16 Nov 2012 14:59:14 +0000 (+0000) Subject: Show error message to prevent adding a shared folder in the root dir fix #468 X-Git-Tag: v5.0.0alpha1~416^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=02bc44090017d457fbcf59ec965a0a98ebf82bb3;p=nextcloud-server.git Show error message to prevent adding a shared folder in the root dir fix #468 --- diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 982351c589e..abde963e423 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -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()) {