From 02bc44090017d457fbcf59ec965a0a98ebf82bb3 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Fri, 16 Nov 2012 14:59:14 +0000 Subject: [PATCH] Show error message to prevent adding a shared folder in the root dir fix #468 --- apps/files/js/files.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 982351c589..abde963e42 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()) {