diff options
author | Georg Ehrke <developer@georgehrke.com> | 2014-03-06 11:55:45 +0100 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2014-03-06 11:55:45 +0100 |
commit | eb5265b1065c4978028c34ee7b77aff137c51c9f (patch) | |
tree | 8448dbbf0eecb87746cfc23ee8ecd1389295fa89 /apps/files/js/files.js | |
parent | dbf83aada2f8dae509d17b947ecce6a4d09f8174 (diff) | |
parent | 1785c0c9b9fcdc6e9a8e58f13f45e5b53364882a (diff) | |
download | nextcloud-server-eb5265b1065c4978028c34ee7b77aff137c51c9f.tar.gz nextcloud-server-eb5265b1065c4978028c34ee7b77aff137c51c9f.zip |
fix merge conflicts
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index f4546120702..48e5771ae8a 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -87,9 +87,12 @@ var Files = { * Throws a string exception with an error message if * the file name is not valid */ - isFileNameValid: function (name) { + isFileNameValid: function (name, root) { var trimmedName = name.trim(); - if (trimmedName === '.' || trimmedName === '..') { + if (trimmedName === '.' + || trimmedName === '..' + || (root === '/' && trimmedName.toLowerCase() === 'shared')) + { throw t('files', '"{name}" is an invalid file name.', {name: name}); } else if (trimmedName.length === 0) { throw t('files', 'File name cannot be empty.'); |